taz321 Posted March 11, 2008 Share Posted March 11, 2008 Basically i have an helpdesk system and everytime an user fills in and submits a query, it goes to a work queue. When you look at this work queue - 1) Any new queries are placed at the bottom of the queue instead of at the top, which i want !!, it is much like the phpFreaks forum where all new posts are inserted at the top. Any idea on how to do this Thanks Link to comment https://forums.phpfreaks.com/topic/95645-sorting-in-descending-order/ Share on other sites More sharing options...
discomatt Posted March 11, 2008 Share Posted March 11, 2008 Are you grabbing them via mysql? If so, add DESC to your order by clause. SELECT * FROM `table` ORDER BY `id` DESC Link to comment https://forums.phpfreaks.com/topic/95645-sorting-in-descending-order/#findComment-489674 Share on other sites More sharing options...
Orio Posted March 11, 2008 Share Posted March 11, 2008 SELECT * FROM `messages` ORDER BY date DESC Orio. Link to comment https://forums.phpfreaks.com/topic/95645-sorting-in-descending-order/#findComment-489677 Share on other sites More sharing options...
discomatt Posted March 11, 2008 Share Posted March 11, 2008 SELECT * FROM `messages` ORDER BY date DESC Orio. Just so you know, he said newest queries, not queries with the latest date Link to comment https://forums.phpfreaks.com/topic/95645-sorting-in-descending-order/#findComment-489692 Share on other sites More sharing options...
taz321 Posted March 11, 2008 Author Share Posted March 11, 2008 Thanks, all working now. Link to comment https://forums.phpfreaks.com/topic/95645-sorting-in-descending-order/#findComment-489706 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.