Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2014
    Posts
    74
    Thanks
    11
    Thanked 0 Times in 0 Posts

    Listing MySQL table in reverse

    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 the 'number' in the order 1, 2, 3, 4, etc...

    Code:
    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...)?

  • #2
    New Coder
    Join Date
    Jan 2014
    Posts
    74
    Thanks
    11
    Thanked 0 Times in 0 Posts
    Add the following onto the end of the string:

    Code:
    ORDER BY row DESC
    'row' is your row.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •