Hello,
Using: (v8.3p_2013-01-09/PowerEdition Deployment 2013-01-09)
The following code is all server-side (I am building a webservice).
I have a customSQL (mysql) query, like so:
(Note the use of SQL_CALC_FOUND_ROWS.)
However, if I do a call like:
This yields the number specified in limit. However, I would like it to yield the total amount as if there was no limit.
How can I achieve this?
I tried using creating another DSRequest with customSQL that did something along the lines of SELECT ROWS_FOUND(), but this always yielded 1, instead of the real number.
Could you give some advice as in how to achieve the thing I want?
Using: (v8.3p_2013-01-09/PowerEdition Deployment 2013-01-09)
The following code is all server-side (I am building a webservice).
I have a customSQL (mysql) query, like so:
Code:
<customSQL> <![CDATA[ SELECT SQL_CALC_FOUND_ROWS p.Product_id, ... FROM Product p WHERE # ... some complex where clause LIMIT $dsRequest.getStartRow(), $dsRequest.getEndRow() </customSQL>
However, if I do a call like:
Code:
DSResponse resp = req.execute(); Long total = resp.getTotalRows(); //yields the total of rows as per the limit set.
How can I achieve this?
I tried using creating another DSRequest with customSQL that did something along the lines of SELECT ROWS_FOUND(), but this always yielded 1, instead of the real number.
Could you give some advice as in how to achieve the thing I want?
Comment