Forum Moderators: coopster
how can I display all records for the past 3 months from db?
im only using the type date.
I just need the sql syntax...
thanx.. any help would be appreciated. ",
SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;
I believe you can use months in the interval, so in your case, it would be 'INTERVAL 3 MONTH'
-sned