Syntax error
Posted: Tue Jun 29, 2010 10:35 am
hi everyone
getting a headache, can't work out whats wrong with this syntax!
the content_for_import is a normal text column with NULL as the default
the date created is a datetime with NULL as the default
the date modified is a datetime with 0000-00-00 00:00:00 as the default
There is an id with auto increment etc, and all other sql works fine manipulating this table
can anyone see what i am doing wrong here, because i just can't see it
cheers,
Doug
getting a headache, can't work out whats wrong with this syntax!
Code: Select all
INSERT INTO import_table ("content_for_import","date_created","date_modified") VALUES ("content here","0000-00-00 00:00:00","0000-00-00 00:00:00") ON duplicate KEY UPDATE "content_for_import"="content here","date_created"="0000-00-00 00:00:00","date_modified"="0000-00-00 00:00:00";
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 ' ("content_for_import","date_created","date_modified") VALUES ("content here","0000-00-00 0' at line 1the date created is a datetime with NULL as the default
the date modified is a datetime with 0000-00-00 00:00:00 as the default
There is an id with auto increment etc, and all other sql works fine manipulating this table
can anyone see what i am doing wrong here, because i just can't see it
cheers,
Doug