时间:2021-07-01 10:21:17 帮助过:17人阅读
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-%d')
或
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-01')
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-%d')
或
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-01')
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-%d')
或
select * fromtbl_namewhere date >= date_format(subdate(now(), INTERVAL 3 month), '%Y-%m-01')
date("Y-m",strtotime("-3 month"))."-01"; 三个月前的第一天
你都有算法了 三个月的不会么? 照葫芦画瓢整呗