View Full Version : wrong syntax
08-23-2006, 07:45 PM
I tried to executed the below code, but something is wrong, Can somebody tell me what's wrong?
INSERT INTO country VALUES (1, 'AE');
INSERT INTO country VALUES (2, 'AF');
INSERT INTO country VALUES (3, 'AG');
08-23-2006, 10:06 PM
when ever i do an insert i first define which fields the data is going to be written to. Like this...
INSERT INTO country (id, country) VALUES (1, 'AE');
INSERT INTO country (id, country) VALUES (2, 'AF');
INSERT INTO country (id, country) VALUES (3, 'AG');
08-23-2006, 10:28 PM
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 '; INSERT INTO country (id, country) VALUES (6, 'AL')' at line 1
08-23-2006, 10:35 PM
is bm60_staaten the name of ur table where all the countries are stored???
08-23-2006, 10:42 PM
did it enter the values before this into the db if so i could be a problem with that specific INSERT statement????
08-23-2006, 10:55 PM
Are you sending all three queries through one PHP mysql_query() call, by chance?
08-23-2006, 11:00 PM
sorry I edit and save the changes. The name is Country the other name is based on helo in other forum. hehehe
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.