Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

mysql throwing syntax error

I am trying to update my wordpress table and this query string which look fine to me is throwing a syntax error.
Is there something I'm missing.

UPDATE `wp_options` SET `option_value` = replace(`option_value`, "http://www.denverkollel.org/site", "http://www.denverkollel.org") WHERE `option_name` = 'home' OR `option_name` = 'siteurl';
Avatar of chaau
chaau
Flag of Australia image

You need to use the apostrophes instead of the double quotes:
UPDATE `wp_options` 
SET `option_value` = replace(`option_value`, 'http://www.denverkollel.org/site', 'http://www.denverkollel.org') 
WHERE `option_name` = 'home' OR `option_name` = 'siteurl'; 

Open in new window

Avatar of rivkamak

ASKER

Sorry, that didn't help the problem
And what error are you getting?
SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America 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
SOLUTION
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
Yes.  And the manual says it acts like INSERT.  I don't think it should be used where it is in the original post.
ASKER CERTIFIED SOLUTION
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