Order by Descending
I have a small script that is fetching data as
I want to display the fetched data in Descending order based on the value in 'up' for each entry , so I tried that
$sql=mysql_query("SELECT * FROM messages LIMIT 9");
but I get the error "supplied argument is not a valid MySQL result resource"
$sql=mysql_query("SELECT * FROM messages LIMIT 9 ORDER BY up DESC");
What is the problem here
OK a quick update, I have got it working I just had to remove that LIMIT 9 from the script
what exactly does the limit 9 does ? can I remove it permanently ?
LIMIT 9 means "return only 9 rows"
put it back after the ORDER BY, not in front
Thanks for your help
Originally Posted by r937