I am trying to select data from a mysql database using php. I only want to select the data that has been entered in the last 3 months. I have a date column which holds data in the following format:
2004-08-09 00:21:41
How would I need to set up my select query to achieve this? I think I need to state the format of the date differntly but don’t know what it should be
What I have just now is not working,
SELECT * FROM orders WHERE purchased_date > ‘2010-01-01’
any help much appreciated.