I have a basic query fetching results for all results earlier than today:
...where post_date < '".current_time('mysql')."'....
How do I only fetch results for the past 6 months, i.e.:
...where post_date > '".current_time('mysql')."' - 6 MONTHS && post_date < '".current_time('mysql')."'...
Use DATE_SUB (and
GETDATE())