wwfc_barmy_army Posted June 9, 2008 Share Posted June 9, 2008 UPDATE user SET 1 = mymsn@hotmail.com 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 = mymsn@hotmail.com WHERE user_id = 123' at line 2 Any ideas why i'm getting this error? Thanks. Quote Link to comment 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. Quote Link to comment 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' = mymsn@hotmail.com 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' = mymsn@hotmail.com WHERE user_id = 123' at line 1 Any ideas? Thanks. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.