pioneerx01 Posted May 10, 2013 Share Posted May 10, 2013 I have a table where one field (column) is called AS. I know that is a command, but I was wondering if there is a way around it. I want to do this: mysql_query("UPDATE registrations SET AS = '9' WHERE ID = '123' "); That AS is throwing it off. I do not get an error, just 9 doues not appear under the AS column in the table. Thanks Quote Link to comment Share on other sites More sharing options...
Solution PravinS Posted May 10, 2013 Solution Share Posted May 10, 2013 As "AS" is reserved word in MySQL, so may not be updating the record and also not giving any error as sql syntax is correct. Try using this query mysql_query("UPDATE registrations SET `AS` = '9' WHERE `ID` = '123' "); Quote Link to comment Share on other sites More sharing options...
pioneerx01 Posted May 10, 2013 Author Share Posted May 10, 2013 You know that actually worked. I am happy that I do not have to think arround it. I know that 2 letter words like AS IF OR are not the best ones to use. Thanks so much! 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.