Link to home
Start Free TrialLog in
Avatar of ost87
ost87

asked on

remove quotes from field in mysql db

Hi

I have content in a field in my mysql db which have quotes i.e :

'MY CONTENT'

I need an sql that will remove these quotes.
Avatar of hielo
hielo
Flag of Wallis and Futuna image

UPDATE tablename SET `fieldname`=REPLACE(`fieldname`,"'","")
Avatar of ost87
ost87

ASKER

hi

that didn't remove them
Are you sure you supplied the correct value for tableName and filedname? From where are you submitting the query?
Avatar of ost87

ASKER

perhaps I should give you the background.

I have imported some urls into a database.

when these urls are clicked, I get an error in the browser becuase link is incorrect. This what I get:
/\"http://www.mydomain.com/\

So, I need to remove the stuff around the url (perhaps it isn't quotation?)

really appreciate your help
My first example was to remove single quotes since you posted this:
'MY CONTENT'

From your last post, it seems you need to remove double quotes
UPDATE tablename SET `fieldname`=REPLACE(`fieldname`,'"',"")
Avatar of ost87

ASKER

hi
tested but didn't work
How are you retrieving the data? Are you using PHP?
Avatar of ost87

ASKER

yes, php.
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ost87

ASKER

this problem wasn't a db issue, but problem in program I was using. but thansk for help anyway
You are welcome