In the past, what I do is using the php to get the 30 days ago date
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"), date("Y"));
$lastmonth_date=date("Y-m-d", $lastmonth);
And then compare this $lastmonth_date with the date_added field (datetime type).
how to not using php to get 30 days ago date first, just ask the mysql to do this 30 days ago sql select with mysql built in features?
And which approach you prefer?
Thanks!