I’m writing some PHP code to insert a value into my MySQL database:
INSERT INTO users_validate (uid, key) VALUES ('11', '4866ce5568850eb5f8daad79a8822d26')
Could anybody tell me what’s wrong with this?
Edit: The error message is
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) VALUES ('11', '4866ce5568850eb5f8daad79a8822d26')' at line 1
Try to escape your column name
key:KEYis a reserved word in MySQL: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html