This topic is locked

Limit results in Query Designer

8/16/2009 5:49:19 PM
PHPRunner General questions
R
roadyx author

Hi I'm trying to limit the results to the last 20 records. How do I do it in Query Designer? I am able to put limit 20 on the SQL tab but it doesn't hold it permanently.

J
Jane 8/17/2009

Hi,
unfortunately PHPRunner do not support LIMIT statement in the Query Designer.

You can add LIMIT to the generated ..._list.php file only.

A
acpan 8/17/2009

I use a workaround which may help you ...
You may want to try at the event code before SQL query,

modify the SQL string to be executed:
Use php search and replace function, search for the

string "Limit " in $strSQL and replace it with your

limit parameters.
Use echo $strSQL to see what exactly executed.
acpan

R
roadyx author 8/18/2009

I use a workaround which may help you ...

You may want to try at the event code before SQL query,

modify the SQL string to be executed:
Use php search and replace function, search for the

string "Limit " in $strSQL and replace it with your

limit parameters.
Use echo $strSQL to see what exactly executed.
acpan
Hi ACPAN, actually followed your advice, replaced strSQL with the entire SQL statement and added a LIMIT statement. Works well with charts!
Thanks ACPAN AND JANE!