Link to home
Start Free TrialLog in
Avatar of Victor Kimura
Victor KimuraFlag for Canada

asked on

Update MySQL field to change smart quote to straigth quote

Hi,

I have some fields in a table products which has some smart quotes (from Microsoft Word) in them and the smart quotes don't work well with Javascript. So is there a fast way to update the smart quotes and change them to straight quotes using MySQL only. I know I can do this with PHP but I'd like to see the code for doing it with MySQL code only.

I can do this and  receive 30 rows:
SELECT products.product_descr
     , products.short_description
     , products.product_active_ingr
     , products.product_actives
     , products.product_id
     , products.product_name
FROM
  products
WHERE
  products.product_descr LIKE '%’%'
  OR products.short_description LIKE '%’%'
  OR products.product_active_ingr LIKE '%’%'
  OR products.product_actives LIKE '%’%'

Open in new window


But I need a update one. For instance, the field product_descr contains this:
Able to hold skin’s moisture in balance through stressful shifts in humidity, like steamy exteriors and interiors parched by air conditioning. Never go thirsty again.

Notice the smart quote in skin's.

Thank you,
Victor

ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand 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 Victor Kimura

ASKER

Thank you.