以下のクエリで次のエラーが発生します。
#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
)
)