1,查询当天(今天)的数据 SELECT * FROM order WHERE TO_DAYS(order_time) = TO_DAYS(NOW()) 2,查询昨天的数据 SELECT * FROM order WHERE TO_DAYS(NOW()) - TO_DAYS(order_time) = 1 3,查询最近7天的数据(包括今天一共7天) SELECT * FROM order where DATE_SUB(CURDATE(), INTERVAL 7 DAY) < date(order_time) …