wwfc_barmy_army Posted June 9, 2008 Share Posted June 9, 2008 UPDATE user SET 1 = [email protected] WHERE user_id =123 MySQL said: Documentation #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 '1 = [email protected] WHERE user_id = 123' at line 2 Any ideas why i'm getting this error? Thanks. Link to comment https://forums.phpfreaks.com/topic/109393-solved-sql-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 9, 2008 Share Posted June 9, 2008 If you do have a column named 1, you need to use "quoting" to make it work - Identifiers may begin with a digit but unless quoted may not consist solely of digits. Quoting identifiers in mysql means to use the back-tick ` or double-quotes " around it. Link to comment https://forums.phpfreaks.com/topic/109393-solved-sql-error/#findComment-561232 Share on other sites More sharing options...
wwfc_barmy_army Posted June 9, 2008 Author Share Posted June 9, 2008 Ah thanks. I've tried that but i'm still getting an error: Error SQL query: UPDATE user SET '1' = [email protected] WHERE user_id =123 MySQL said: Documentation #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 ''1' = [email protected] WHERE user_id = 123' at line 1 Any ideas? Thanks. Link to comment https://forums.phpfreaks.com/topic/109393-solved-sql-error/#findComment-561270 Share on other sites More sharing options...
wwfc_barmy_army Posted June 9, 2008 Author Share Posted June 9, 2008 Doesn't matter. I sorted it Thanks. Link to comment https://forums.phpfreaks.com/topic/109393-solved-sql-error/#findComment-561282 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.