mysql查询今日、本周、本月记录

SELECT * FROM table_name WHERE to_days(createtime) = to_days(now());

SELECT * FROM table_name WHERE YEARWEEK(date_format(createtime,'%Y-%m-%d')- INTERVAL 1 DAY) = YEARWEEK(now());

SELECT * FROM table_name WHERE date_format(createtime,'%Y-%m')=date_format(now(),'%Y-%m')

上一篇:svn安装教程


下一篇:在busybox里使用ulimit命令