This topic is locked

Chart not Displaying - Query Not Valid?

10/23/2017 11:59:01 AM
PHPRunner General questions
T
taumic author

Sorry to bother you here again. But "LIMIT 5" doesn't work for me. Not in the SQL-Query TAB nor in the ListPage:Before-SQL Query event- (which would be much more important to me).

Can you help me? Is there a flag somewhere to make this possible? I must have tomatoes on my eyes.....



if ($_SESSION['gruppe'] <> "admin")

{

$strOrderBy = "limit 1";

}


PHPR 9.8 / build 29520
Thank's taumic

Sergey Kornilov admin 10/23/2017

This is a wrong way to apply limit. You do not need any events. Use 'Limit data to first "N" rows' option:

https://xlinesoft.com/phprunner/docs/query_designer.htm?zoom_highlightsub=limit

T
taumic author 10/24/2017

Thank you for this hint!

But how could I implement the following requirement?
If member of the group "Customers" ($_SESSION), then only show one record (the first record found) in the list?
Anybody have an idea?