#1
  1. No Profile Picture
    Andrew T
    Guest
    Devshed Newbie (0 - 499 posts)
    First off, I am using PHP for the script. Here is a MySQL command that I am using it:

    SELECT id, day, title, publisher, developer FROM previews ORDER BY id

    With that command it orders the id like this:
    1
    2
    3

    However, I want it to order it like this:
    3
    2
    1

    Do you have any idea of how to do that? I tried rsort() but either it
    didn't work or I was using it wrong.

    Thanks,
    Andrew
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    rsort() is a PHP function and can't be used inside the SQL statment. Fortunately, there is a simple solution. Rewrite your query to this:

    SELECT id, day, title, publisher, developer FROM previews ORDER BY id DESC

    Rod

Similar Threads

  1. Help with reverse DNS.
    By TristanOfADown in forum DNS
    Replies: 1
    Last Post: January 6th, 2004, 02:44 AM
  2. reverse DNS problem
    By ads in forum DNS
    Replies: 4
    Last Post: December 17th, 2003, 09:45 PM
  3. reverse lookup sort of broken
    By waddahassle in forum DNS
    Replies: 0
    Last Post: October 29th, 2003, 04:30 PM
  4. questions about Creating a food ordering system??
    By mav8 in forum PHP Development
    Replies: 5
    Last Post: August 18th, 2003, 06:01 PM
  5. Ordering by reverse integers
    By jomohke in forum MySQL Help
    Replies: 2
    Last Post: April 15th, 2002, 07:52 AM

IMN logo majestic logo threadwatch logo seochat tools logo