Thread: Order by?
View Single Post
  #2  
Old 04-20-2012, 04:26 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,780
Hall of Famer is on a distinguished road
Default

Well just pass ORDER BY to the whereclause, if you have a whereclause. Incase you do not have a whereclause(and thus selecting all rows), you can do the following:

PHP Code:
$stmt $GLOBALS['adopts']->select("items", array(), "1 ordered by itemname"); 
It may look a bit funny, but the magical keyword '1' does the trick for ya.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote