来自 热门技术 2018-12-05 09:00 的文章

mysql查询一天,一周等隔日数据


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) <= date(tbor_create_time);   www.2cto.com   --查询一个月 select * from tbl_order where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(tbor_create_time);   --两个日期之间的数据 select * from tbl_order where tbor_create_time>'2012-01-20 00:00:00' and tbor_create_time<'2012-02-7 00:00:00';  

http://www.bkjia.com/Mysql/488429.htmlwww.bkjia.comtruehttp://www.bkjia.com/Mysql/488429.htmlTechArticlemysql查询一天,一周等隔日数据 --查询一天 select * from tbl_order where date(tbor_create_time) = curdate(); select * from tbl_order where to_days(tbor_create_time) =...

本文源自: AG88平台