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.
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.
UPDATE tablename SET `fieldname`=REPLACE(`field name`,"'", "")
ASKER
hi
that didn't remove them
that didn't remove them
Are you sure you supplied the correct value for tableName and filedname? From where are you submitting the query?
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
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(`field name`,'"', "")
'MY CONTENT'
From your last post, it seems you need to remove double quotes
UPDATE tablename SET `fieldname`=REPLACE(`field
ASKER
hi
tested but didn't work
tested but didn't work
How are you retrieving the data? Are you using PHP?
ASKER
yes, php.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
this problem wasn't a db issue, but problem in program I was using. but thansk for help anyway
You are welcome