SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict AshleyH's Avatar
    Join Date
    Mar 2005
    Posts
    260
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Display items older than 6months

    I'm trying to display news items older than 6 months old:

    I've got this code but not sure where I'm going wrong.

    SELECT *
    FROM tbl_news
    ORDER BY news_date DESC

    WHERE news_date >= #now()# INTERVAL 6 MONTH

    Any pointers would be appreciated!

    Many thanks

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,398
    Mentioned
    147 Post(s)
    Tagged
    4 Thread(s)
    Start by putting the ORDER BY after the WHERE


Bookmarks

Posting Permissions

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