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 4 of 4

Thread: Id

  1. #1
    New Coder
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Id

    What is the code to order items from the last to first ID in the database, instead of the first to last. I don't want 1 2 3, I want 3 2 1 displayed.

    Current code:

    PHP Code:
    $extract mysql_query("SELECT * FROM news ORDER BY id ASC"); 
    What do I replace ASC with?
    Last edited by SRBuckey5266; 10-10-2009 at 11:23 PM.

  • #2
    New Coder
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I got it, never mind.

  • #3
    New Coder
    Join Date
    Jan 2009
    Posts
    45
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Rofl...

    How pathetic.

  • #4
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,352
    Thanks
    61
    Thanked 528 Times in 515 Posts
    Quote Originally Posted by SRBuckey5266 View Post
    Rofl...

    How pathetic.
    Not if you didn't know it isn't. No-one is born with the information in their head - we've all had to find out somehow
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

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