I'm pulling a row from a database and there is a date field (y-m-d). I need to create an if statement so that I can do something IF that date is longer then 13 days ago. I've already found out how to display all results which are longer then 13 days ago if it is any help.
SELECT * FROM links WHERE (TO_DAYS(NOW()) - TO_DAYS(date))>13
Any help would be greatly appreciated.