Hey guys,
I was wondering and I can't seem to find the way how to do this but it has to be done!
I am running a mysql table (called hunters) in hunters there is a date of a submission (timestamp, yyyymmddhhmmss).
I only want the script to pull out dates from the database that are no more that 30 days old.
How can I do this?
Thanks,
Adam.






Mark Hensler posted this at 17:31 — 26th January 2002.
He has: 4,044 posts
Joined: Aug 2000
SELECT * FROM table_name WHERE TO_DAYS(NOW()) - TO_DAYS(date_col) > 30
mySQL Docs: 6.3.4 Date and Time Functions
Mark Hensler ["Max Albert"] [Email]
If there is no answer on Google, then there is no question.