mysql查询前一天的数据

在mysql数据库中,经常会遇到统计当天的内容。 例如,在user表中,日期字段为:log_time 统计当天mysql sql语句为:   sql select * from user where date(log_time) = curdate(); curdate()表示当天日期 统计前一天数据库 若是表示前一天的数据,则不能使用curdate()-1,由于当日期为月初时,curdate()
相关文章
相关标签/搜索