law Posted March 10, 2010 Share Posted March 10, 2010 Ok.. as a novice coder.. I am not aware of all the functions associated with any language.. well it has bitten me in the rump! Here is an Example: Table Name: LocationOfClothes ----------------------------------------------------------------------------------------------------------------------------------------------- | id | left | right | head | chest | ----------------------------------------------------------------------------------------------------------------------------------------------- | 1 glove 0 hat 0 | Ok in this example left, right,head,chest are places you can put clothing. Well if you try to update column "left" you get an error bc "left" is a predefined mysql function? You can SELECT * the table without an error. Due to this. I have written myself into a pickle. I have been using the col names all throughout my code. It would be a headache to "redo" it. I may have to.. I just thought I would toss it out to you guys to see if you know of a way I can update the "left & right" Columns Quote Link to comment https://forums.phpfreaks.com/topic/194815-oops-darn-mysql-functions-messing-up-my-col-names/ Share on other sites More sharing options...
law Posted March 10, 2010 Author Share Posted March 10, 2010 Google comes through.. apparently these are called "Reserved Words" http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html To fix my issue all I need to do is refer to the column in question by TableName.left! Quote Link to comment https://forums.phpfreaks.com/topic/194815-oops-darn-mysql-functions-messing-up-my-col-names/#findComment-1024429 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.