mysql時間別クエリー
421 ワード
:
select * from table where to_days(column_time) = to_days(now());
select * from table where date(column_time) = curdate();
( 7 ):
select * from table where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(column_time);
:
select * from table where DATE_SUB(CURDATE(), INTERVAL INTERVAL 1 MONTH) <= date(column_time);