我正在尝试在Mysql中查找超过60天但不到90天的记录。 超过60天的工作,但我似乎只能获得不超过89天的记录。
SELECT * FROM signings WHERE datediff(now(), signstart) > 60 < 90
答案 0 :(得分:0)
尝试
SELECT * FROM signings WHERE datediff(now(), signstart) > 60 and datediff(now(), signstart) < 90
答案 1 :(得分:0)
SELECT * FROM signings WHERE signstart BETWEEN
DATE_SUB(NOW(), INTERVAL 90 day) AND DATE_SUB(NOW(), INTERVAL 30 day)