c_pattle Posted September 10, 2010 Share Posted September 10, 2010 When you make a mysql query the results are always returned with the first being the first entry in the database. I was wondering if there is a way to make it so that the last entry is returned first and so on? Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/213094-mysql-reverse-order/ Share on other sites More sharing options...
premiso Posted September 10, 2010 Share Posted September 10, 2010 ORDER BY column_name ASC ORDER BY column_name DESC ASC = Ascending Order; DESC = Descending Order Link to comment https://forums.phpfreaks.com/topic/213094-mysql-reverse-order/#findComment-1109779 Share on other sites More sharing options...
Gheeda Posted September 10, 2010 Share Posted September 10, 2010 You can also limit the amount shown...for whatever reasons. An example would look like "SELECT * FROM players ORDER BY level DESC LIMIT 0, 10;"; to have top 10 descending order by level as variable. Link to comment https://forums.phpfreaks.com/topic/213094-mysql-reverse-order/#findComment-1109784 Share on other sites More sharing options...
c_pattle Posted September 10, 2010 Author Share Posted September 10, 2010 Thanks! Link to comment https://forums.phpfreaks.com/topic/213094-mysql-reverse-order/#findComment-1109785 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.