SQL question??

Discussion in 'PHP' started by NeoPhyte101, Mar 8, 2008.

  1. #1
    Hi guys,

    My website has an events page and i'm trying to split it into past events and future events. Does anyone know the correct sql statement for the two sections

    I'm presuming it will be something like order by date old/new. I have the date field set to date type in the form (2008/07/08).

    Thanks for any help
     
    NeoPhyte101, Mar 8, 2008 IP
  2. zerxer

    zerxer Peon

    Messages:
    368
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're simply asking for the correct SQL for ordering things, ORDER BY date ASC would go oldest to newest and ORDER BY date DESC would go newest to oldest.
     
    zerxer, Mar 8, 2008 IP