On my front page I have a list of articles that are pulled from my database. I have just added a column (expires) to the db in order to remove outdated articles.
I'd like to compare today's date to the expires date in my WHERE statement to exlude all articles where the expires date is older than today. But I'm at a loss right now on getting it to work.
barns101
8:15 pm on Mar 15, 2006 (gmt 0)
Assuming that the "expires" column is a Unix timestamp:
SELECT * FROM `articles` WHERE `expires` > UNIX_TIMESTAMP()
mooger35
8:19 pm on Mar 15, 2006 (gmt 0)
ya that's what I was trying but it doesn't work.
edit: `expires` is in date format
whoisgregg
8:29 pm on Mar 15, 2006 (gmt 0)
SELECT * FROM `articles` WHERE `expires` > CURRENT_DATE