MySQL现在()+1天

问题描述:

我在MySQL查询中使用 now()

I'm using now() in MySQL query.

INSERT INTO table SET data = '$data', date = now()

但是我想在此日期添加1天(因此 date 应该包含明天) 。

可以吗?

But I want to add 1 day to this date (so that date should contain tomorrow).
Is it possible?

您可以使用:

NOW() + INTERVAL 1 DAY

如果你只对日期感兴趣,那么不是日期和时间,那么你可以使用CURDATE而不是NOW:

If you are only interested in the date, not the date and time then you can use CURDATE instead of NOW:

CURDATE() + INTERVAL 1 DAY