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

posted @ 2017-02-28 10:11  webbky  阅读(207)  评论(0编辑  收藏  举报