PDA

View Full Version : Stumped on an SQL error...


Enormity
08-02-2009, 01:23 AM
My update query:

Update Table Set game_title = 'Nano Droid Animo',game_type = 'Simple 2-D game',game_desc = 'You control one of Ben 10''s many alien alter-egos in order to destroy all monsters and collect all of the gems.',system_requirements = 'Internet Connection Web Browser Flash Plug-in Keyboard',development_stage = 'Complete',language = 'English',release = '',tester_requirements = 'Have fun.',news = 'You can also create your own game on this website.',game_rating = '',homepage = 'http://gamecreator.cartoonnetwork.com/?id=8407187',in_testing = '0' Where game_id = '287acbf44b42a04476eba0d8437f6a03' AND user_id = '2'

The SQL error:

#1064 - 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 'release = '',tester_requirements = 'Have fun.',news = 'You can also create your ' at line 1

Does anyone have any clue as to why I am getting this error? I am completely stumped.

CFMaBiSmAd
08-02-2009, 01:27 AM
release is a reserved mysql keyword. You must enclose it in back-ticks ` if you want to use it as a column name. You should not use reserved words as column names.

Enormity
08-02-2009, 02:16 AM
release is a reserved mysql keyword. You must enclose it in back-ticks ` if you want to use it as a column name. You should not use reserved words as column names.

Thank you. That was the problem. I didn't know that was a keyword for mysql.