View Full Version : Ordering a list of data

09-18-2003, 08:54 PM
I have list of data on one of the pages of my website. The default order is by the "points" which is great but unfortunately it orders it in the wrong direction i.e. 0 comes before 12. Is there a simple piece of PHP I can "call" when the page opens that will reorder the data to be the "correct" direction i.e. 12 comes higher in the list than 0.

Any help would be greatly appreciated.

Many thanks in advance

09-18-2003, 09:04 PM
Some of us have psychic powers but some relevant code or additional information might help.

If you select the data from a db, then you should do the ordering in sql.
something like
$sql ="SELECT var1, var2, points FROM table ORDER BY points desc"

09-18-2003, 09:22 PM
Please do not crosspost

Please read

I suppose this hread may be closed ?

09-18-2003, 11:09 PM
That is correct.