1查找离当前时间最近的一条数据:
select * from monitor where time = (select time from monitor order by time desc limit 1)
2查找当天数据:
select * from monitor where TO_DAYS(time) = TO_DAYS(NOW())
1查找离当前时间最近的一条数据:
select * from monitor where time = (select time from monitor order by time desc limit 1)
2查找当天数据:
select * from monitor where TO_DAYS(time) = TO_DAYS(NOW())