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.
ost87Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
UPDATE tablename SET `fieldname`=REPLACE(`fieldname`,"'","")
0
ost87Author Commented:
hi

that didn't remove them
0
hieloCommented:
Are you sure you supplied the correct value for tableName and filedname? From where are you submitting the query?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

ost87Author Commented:
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
0
hieloCommented:
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`,'"',"")
0
ost87Author Commented:
hi
tested but didn't work
0
hieloCommented:
How are you retrieving the data? Are you using PHP?
0
ost87Author Commented:
yes, php.
0
hieloCommented:
It seems the problem is that php puts those slashes automatically when it finds those apostrophes, quotes, among others. When you print the value, you need to call strip_slashes. Ex:
$result = mysql_query($sql);
while( $row = mysql_fetch_assoc($result) )
{
 echo strip_slashes($row['comments']);
}

If you are still having problems, post your code.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ost87Author Commented:
this problem wasn't a db issue, but problem in program I was using. but thansk for help anyway
0
hieloCommented:
You are welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.