Page 1 of 1

Sorting my data

Posted: Fri Apr 19, 2002 7:42 am
by glenn
Hi

I need help some help getting PHP script to display data from a table in my MySQL DB, I want to use just one column, with a 4 digit number, and to be printed out in a numerical format by that column. e.g.

This is what would be in the DB:

6666
6665
6667
6664

I would want if printing like :

6667
6666
6665
6664

Please help me! :)

Posted: Fri Apr 19, 2002 9:10 am
by Craig

Code: Select all

ORDER BY $yourcolumn DESC
should be what you are after.

this goes at the end of your MySql query

Posted: Thu May 09, 2002 2:19 am
by prasadharischandra
use DESC like this
where tablename order by tablefield DESC;