0
| id | title     |     start          |
| 1  | smth      | 2017-09-23 12:24:00|

我需要选择开始 = 当前日期 + 3 天的行。

假设当前日期是 2017 年 9 月 23 日。

我的查询是:

select * from db where db.start = DATE_ADD(curdate(), interval 3 day);

查询正在运行,但没有给出任何结果。我绝对确定有一行对应选择参数。我的查询有什么问题?

4

1 回答 1

1
select * from db where DATE(db.start) = DATE_ADD(curdate(), interval 3 day);
于 2017-09-20T09:45:48.047 回答