Niccaman Posted March 7, 2009 Share Posted March 7, 2009 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 '4 = '2' WHERE ID = '1'' at line 1 before that it was "UPDATE ... SET". Can anyone work out the solution. I have tried enclosing the column name in apostrophes... unresolved. I have been working with mysql statements for a while now. This is the first time i have used an integer as a column name and i am unsure how to accompany this change. Quote Link to comment Share on other sites More sharing options...
Mikedean Posted March 7, 2009 Share Posted March 7, 2009 Try `4` when you refer to that column. Quote Link to comment Share on other sites More sharing options...
Niccaman Posted March 7, 2009 Author Share Posted March 7, 2009 Ty for responding, i mentioned i tried enclosing the 4 in apostrophes - ' still didnt work Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 7, 2009 Share Posted March 7, 2009 Those are back-ticks `, not single-quotes ' and you should not be using numbers as column names. Quote Link to comment Share on other sites More sharing options...
Niccaman Posted March 7, 2009 Author Share Posted March 7, 2009 Wow, that fixed the problem, sorry for misunderstanding the first response. im a little embarrassed being ive never heard of backticks in both computer and english language. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 7, 2009 Share Posted March 7, 2009 http://mysql2.mirrors-r-us.net/doc/refman/5.1/en/identifiers.html 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.