Page 1 of 1

Sort question (mysql)

Posted: Fri Jul 02, 2004 10:44 am
by Cypher87
Simple question I think

When I sort something (using mysql) it comes out like:

sort1
sort2
sort3

But I want it to sort like:

sort3
sort2
sort1

How can I do this?

Posted: Fri Jul 02, 2004 10:47 am
by johnperkins21
Use this instead:

Code: Select all

<?php
mysql_query("SELECT * FROM Table ORDER BY ColumnID DESC");

?>
That DESC in there is what you need. Check out http://dev.mysql.com/doc/mysql/en/SELECT.html for more info.