What is wrong with my SQL syntax?
Hello All,
Normally I am okay with syntax, but for the life of me I can't se anything wrong in this statement, so I am going to post it here, along with the mysql_error().
INSERT INTO ct_staff (First_name, Last_name, Initials, Title, Address_line_1, Address_line_2, Address_line_3, Address_line_4, Post_town, Post_code, Telephone, Fax, Email, Mobile, Archived, Region_ID) VALUES ('*', '*****-*****', '***', 'Mr', '*****', NULL, NULL, NULL, '******', '*******', '***** *****', '****** ******', '******@*******.org.uk', '****** *****', 0, 0)
Error: 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 '\'*\', \'****-******\', \'***\', \'Mr\', \'*********\', NULL, NULL, N' at line 1
I am doing this database for a local charity, so I have replaced sensitive values with ***, but I have kept the format the same for each (in case that helps).
All the columns are VARCHAR(50), except Archived = BIT(1) and Region_ID = INT(11), but then that would be a diffrent error, not syntax.
I am using PHP implode to create the statement, and this is is part of a function to import CSV values, I can show the PHP code if that helps.
The statement itself looks fine to me, and I have no idea as to what is wrong.
Any help is much appreciated.
Luke
Edited 1 time(s). Last edit at 05/26/2012 02:49PM by Luke O'Brien.