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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Display users from Newest to Oldest

    Hey,

    I am designing a website. I was wondering in the admin panel how would I display users from newest to oldest.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    This is simply adding an ORDER BY on your query to force the order by a registered timestamp or if you use an autoincrement id you can use this, and specify it as DESC in order.

  • #3
    Regular Coder stevenmw's Avatar
    Join Date
    Jun 2007
    Location
    OK
    Posts
    497
    Thanks
    27
    Thanked 31 Times in 31 Posts
    PHP Code:
    SELECT FROM myTable ORDER BY id DESC 
    if that isn't what you want try searching for tutorials having to do with ORDER BY.

    Take into consideration what Fou-Lu said. The id has to have autoincrement set.


  •  

    Posting Permissions

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