I am trying to insert data into the fields id and term of the table
key. id is an auto-incrementing field.
Each of the following forms fails:-
INSERT INTO key (id, term) VALUES (0, 'dog')
INSERT INTO key ('id', 'term') VALUES (0, 'dog')
INSERT INTO 'key' ('id', 'term') VALUES (0, 'dog')
INSERT INTO 'key' (id, term) VALUES (0, 'dog')
mysql_error() returns messages of the following form:-
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 'key (id,
term) VALUES (0, 'dog')' at line 1
What is wrong with the syntax?
Caversham
key. id is an auto-incrementing field.
Each of the following forms fails:-
INSERT INTO key (id, term) VALUES (0, 'dog')
INSERT INTO key ('id', 'term') VALUES (0, 'dog')
INSERT INTO 'key' ('id', 'term') VALUES (0, 'dog')
INSERT INTO 'key' (id, term) VALUES (0, 'dog')
mysql_error() returns messages of the following form:-
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 'key (id,
term) VALUES (0, 'dog')' at line 1
What is wrong with the syntax?
Caversham
Comment