我在下面的查询中收到以下错误:
#1064 - You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near ')))' at line 1
代码片段:
INSERT INTO test_bans( ip, Expiration )
VALUES (
"0.0.0.0", DateAdd(
"d", 1, Date( )
)
)
建表查询
CREATE TABLE test_bans (
ID smallint(6) NOT NULL AUTO_INCREMENT,
IP text NOT NULL,
Expiration DATETIME NOT NULL,
PRIMARY KEY (ID)
) TYPE=MyISAM;
我错过了什么?
编辑,运行此查询后,我收到此错误。我想我的新问题是如何在当前时间戳中添加一天?
#1305 - FUNCTION optimuscprime.DateAdd does not exist
询问:
INSERT INTO test_bans( ip, Expiration )
VALUES (
"0.0.0.0", DateAdd(
"d", 1,
CURRENT_TIMESTAMP
)
)