Hello!
All my new database records display the oldest first in the html page. How can i make the sorting of the records by newest at the top ?
Hi djrobbie,
Put `recordtime` DESC in the Order fields box.
Bob
Then i get this:
Warning: Invalid argument supplied for foreach() in XXX /components/com_chronoconnectivity/libraries/connection.php on line 300
Hi djrobbie,
It's a warning, not an error; but do your results sort correctly?
If not do you have a recordtime column in the table?
Do you see any results without the ORDER entry?
Bob
I have tried the above suggested method.
I've tried 'logDate' ASC and 'logDate' DESC but the order is not changing.
My goal was to display the newest entry first.
Hi status260,
They should be back-ticks `` round the column name not straight quotes. Please try `logDate` ASC
Bob
Yes Greyhead the back ticks was the problem. I was unaware that it made a difference...
Hi status260.
MySQL uses straight quotes for text strings and back-ticks for column and table names.
Bob
Thank you kindly for the education.