I get the following error in the following query:
Code snippet:
INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, Date( ) ) )
Table creation request
CREATE TABLE test_bans ( ID smallint(6) NOT NULL AUTO_INCREMENT, IP text NOT NULL, Expiration DATETIME NOT NULL, PRIMARY KEY (ID) ) TYPE=MyISAM;
What am I missing?
Edit, after executing this request, I received this error. I think my question is ew: how to add a day to my current timestamp?
#1305 - FUNCTION optimuscprime.DateAdd does not exist
Query:
INSERT INTO test_bans( ip, Expiration ) VALUES ( "0.0.0.0", DateAdd( "d", 1, CURRENT_TIMESTAMP ) )
source share