bitsCN.com
mysql查询一天,一周等隔日数据
--查询一天
select * from tbl_order where date(tbor_create_time) = curdate();
select * from tbl_order where to_days(tbor_create_time) = to_days(now());
--查询一个周
select * from tbl_order where DATE_SUB(CURDATE(), INTERVAL 7 DAY)
--查询一个月
select * from tbl_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY)
--两个日期之间的数据
select * from tbl_order where tbor_create_time>'2012-01-20 00:00:00' and tbor_create_time
bitsCN.com
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号