Phaelon Posted May 13, 2014 Share Posted May 13, 2014 Hi all,I have a MySQL table with the field 'number'.When I SELECT * from that field, I get a return for the rows of 'number' in the order 1, 2, 3, 4, etc... SELECT * FROM products; Is there a way where I can get a return in the reverse order, so highest to lowest (4, 3, 2, 1, etc...)? Link to comment https://forums.phpfreaks.com/topic/288456-listing-mysql-table-in-reverse/ Share on other sites More sharing options...
Barand Posted May 13, 2014 Share Posted May 13, 2014 SELECT .... ORDER BY whatever DESC Link to comment https://forums.phpfreaks.com/topic/288456-listing-mysql-table-in-reverse/#findComment-1479319 Share on other sites More sharing options...
Phaelon Posted May 13, 2014 Author Share Posted May 13, 2014 Thanks, but it didn't work. SELECT * FROM products DESC; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DESC' at line 1 Link to comment https://forums.phpfreaks.com/topic/288456-listing-mysql-table-in-reverse/#findComment-1479321 Share on other sites More sharing options...
Barand Posted May 13, 2014 Share Posted May 13, 2014 Then I suggest you re-read my post Link to comment https://forums.phpfreaks.com/topic/288456-listing-mysql-table-in-reverse/#findComment-1479322 Share on other sites More sharing options...
Phaelon Posted May 13, 2014 Author Share Posted May 13, 2014 Wow! Yeah how did that happen!! OK I tried it, it works. You are truly awesome! Thank you. Link to comment https://forums.phpfreaks.com/topic/288456-listing-mysql-table-in-reverse/#findComment-1479327 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.