I have a database with nearly 100 fields.
DB structure is
id | comment | time
I need to fetch only 5 newest record (I can get those records using ORDER by time DESC). But while printing them I need to print the oldest of those 5 records first and proceed in reverse in a way that the newest record will be printed last.
Ok, after fetching result set in ascending order with a limit of number of rows
you can do this to print them in reverse order (descending order)
OR
This could be done with mysql_data_seek
Directly taken from here