madcrazy1 Posted May 7, 2008 Share Posted May 7, 2008 I need to order by row parameter then by another row parameter then finally order these results by DESC is it possible? one row called "animaltype" holds one of 5 variables either:(tiger,owl,whale,monkey,dog) Another row holds one of 5 other variables either: (blue,black,orange,pink,gold) the last row holds the "id" which tells desc to order by "time" or "date" i want to run a query to bring back a result of:\ only blue owls in descending order by their "id" please cobstruct this ORDER Statement for me. Many Thanks Link to comment https://forums.phpfreaks.com/topic/104506-multiple-order-by-tree/ Share on other sites More sharing options...
Hooker Posted May 7, 2008 Share Posted May 7, 2008 SELECT * FROM table WHERE animaltype = 'owl' AND animalcolor = 'blue' ORDER BY id DESC; No multiple ORDER BY's needed, deffinately start reading MYSQL books because thats about as basic as it gets. Link to comment https://forums.phpfreaks.com/topic/104506-multiple-order-by-tree/#findComment-534996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.