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
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.
$sql ="SELECT var1, var2, points FROM table ORDER BY points desc"
Please do not crosspost
I suppose this hread may be closed ?
09-18-2003, 11:09 PM
That is correct.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.