This topic is locked

GROUP BY Order in Reports

6/20/2010 9:40:22 AM
PHPRunner General questions
A
andrewpnlp author

Hi all,

I'm trying to create a report of order information, grouping by date DESCENDING - newest dates first, oldest last. But no matter what I do, it always renders oldest first.
MySQL syntax is:
SELECT fields

FROM table

GROUP BY field {ASC/DESC}
But no matter whether I modify the report SQL directly to include ASC or DESC, nothing changes.
The date field is an INT field storing the unix timestamp, so the specific query I've got is:
SELECT

id,

order_ref,

client_id,

client_firstname,

client_lastname,

client_email,

FROM_UNIXTIME(order_date) AS order_date,

order_status,

ship_date

FROM orders

GROUP BY FROM_UNIXTIME(order_date) DESC, order_ref
Can anyone provide any help?
Regards,

Andy

Sergey Kornilov admin 6/21/2010

Andrew,
make sure you use the latest build of PHPRunner (5482). If this doesn't help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.