今天:
select * from `article` where to_days(`add_time`) = to_days(now());
select * from `article` where to_days(now()) – to_days(`add_time`) <= 1;
select * from `article` where date_sub(curdate(), INTERVAL 7 DAY) <= date(`add_time`);
select * from `article` where date_sub(curdate(), INTERVAL 30 DAY) <= date(`add_time`);
select * from `article` where date_format(`add_time`, '%Y%m') = date_format(curdate() , '%Y%m');