PHP MySQL update syntax when using special characters
I have a database where one of the fields is feet and inches with the special characters, like this 12'1"
This data is used in this format all over, so I do not want to change it. If I was starting fresh I would separate the fields, use html codes or other things, but I am where I am.
I am having a hard time doing the updates. I am using this in the update where clause:
`boat_beam` = '$boat_beam',
and I am sure I am failing because of the ' around $boat_beam and having ' inside $boat_beam. It updates fine if I use am empty variable.
This code used to work, until the a recent php upgrade on my server. I have tried replacing the ' around the variable $boat_beam, but I cannot find anything that will work).
Anyone have the solution? I really need a way to get past this update error leaving the rest of the system intact.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)