MySQL - Reversed ORDER BY
Moderator: General Moderators
MySQL - Reversed ORDER BY
Alright, I have a table that stores news and I need to display the news backwards so that the latest news is at the top, and oldest at the bottom. Can anyone help? I've searched the forum, but couldn't find anything. TIA.
this should help either put DESC OR ASC, i can remember which one is which, but make sure its at the end of the statement. unless its followed by a LIMIT. ex.
$db = mysql_query("SELECT * FROM `table` ORDER BY `row` DESC LIMIT 6");
Below is the line that should be used.
ORDER BY `row` DESC
$db = mysql_query("SELECT * FROM `table` ORDER BY `row` DESC LIMIT 6");
Below is the line that should be used.
ORDER BY `row` DESC
Last edited by Vicious on Sun May 08, 2005 1:24 am, edited 1 time in total.