mysql 查询近几天的结果
1 //近两天的 不包括当天的数据 2 3 select * from order_info 4 where DATEDIFF(CURDATE(),createTime)<3 and DATEDIFF(CURDATE(),createTime)>0
今天的数据 select* fromorder_info where date(createtime)=curdate()
查询近几天的数据 包括当天的 select * from procurement where DATEDIFF(NOW(),createDate)<2 and DATEDIFF(NOW(),createDate)>=0 where
更多:http://www.open-open.com/code/view/1423207309170