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 Coder
    Join Date
    Feb 2006
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    timestamp sort in descending order??

    i have a system that captures registrations. the registrations are timestamped.

    the default sort when i view the entire table is by name. how can i sort by the latest registration at the top??

    i've tried to do ORDER BY [timestamp] DESC

    does that work?
    [=cHeRyL=]

  • #2
    Regular Coder
    Join Date
    Sep 2005
    Posts
    394
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ORDER BY `timestamp` DESC

    ~Phil~

  • #3
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,088
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Is timestamp the name of your data element in your database table? If so, that's probably why you're having problems. That is a reserve word in MySQL. Change that data element name to something else and your query should work. BTW, you shouldn't have to put brackets around it in your query.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!


  •  

    Posting Permissions

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