Har*_*Joy 75
可能与:
SELECT count(*) FROM `table`
where
created_at>='2011-03-17 06:42:10' and created_at<='2011-03-17 07:42:50';
Run Code Online (Sandbox Code Playgroud)
或使用between:
SELECT count(*) FROM `table`
where
created_at between '2011-03-17 06:42:10' and '2011-03-17 07:42:50';
Run Code Online (Sandbox Code Playgroud)
您可以根据需要更改日期时间.可以使用curdate()或now()获得所需的日期.
select * from yourtable where created < now() and created > '2011-04-25 04:00:00'
Run Code Online (Sandbox Code Playgroud)
select * from yourtable
where created < now()
and created > concat(curdate(),' 4:30:00 AM')
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
139331 次 |
| 最近记录: |