|
Posted by chris.huh on 04/02/06 04:08
I am making a blog, and want the home page to only display the records
from the current month.
I have tried using:
SELECT id, date_format(date, '%D %M %Y') as date, title, article,
catagory, publication
FROM articles
WHERE DATE_ADD(date, INTERVAL 1 MONTH) > NOW()
ORDER BY `date` DESC
At first this seemed to work fine but then i realised that it selected
the data from every month by that name, regardless of the year that it
was in.
How do i limit it to only this current year as well as this current
month, i'm sure it's just a simple alteration but cannot figure it out.
Navigation:
[Reply to this message]
|