I have a table called design_designs
The table contains 4 columns: id, key, value, nonceId
I'm attempting to run a query to insert into the table:
INSERT INTO design_designs(key, value, nonceId)
VALUES ('test key', 'test value', 'test nonce');
The error i get is:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'key, value, nonceId)
VALUES ('test key', 'test value', 'test nonce')' at line 1
Any idea what I'm doing wrong? According to the documentation on queries my query is correct. I'm obviously missing something.
CodePudding user response:
key
is a reserved word, you must delimit it:
INSERT INTO design_designs(`key`, value, nonceId) VALUES...