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 ?
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 ?
Then i get this:
Warning: Invalid argument supplied for foreach() in XXX /components/com_chronoconnectivity/libraries/connection.php on line 300
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
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.
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
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
MySQL uses straight quotes for text strings and back-ticks for column and table names.
Bob
This topic is locked and no more replies can be posted.