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';
rivkamakAsked:
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.

chaauCommented:
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

0
rivkamakAuthor Commented:
Sorry, that didn't help the problem
0
chaauCommented:
And what error are you getting?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Dave BaldwinFixer of ProblemsCommented:
That doesn't look right to me.  REPLACE acts like INSERT.  I think I would be doing...
UPDATE `wp_options` SET `option_value` = "http://www.denverkollel.org" WHERE `option_name` = 'home' OR `option_name` = 'siteurl'; 

Open in new window


If the previous value is important, maybe this:
UPDATE `wp_options` SET `option_value` = "http://www.denverkollel.org" WHERE (`option_name` = 'home' OR `option_name` = 'siteurl') AND `option_value` = "http://www.denverkollel.org/site"; 

Open in new window

0
chaauCommented:
There is a REPLACE function in MySQL
0
Dave BaldwinFixer of ProblemsCommented:
Yes.  And the manual says it acts like INSERT.  I don't think it should be used where it is in the original post.
0
pcelbaCommented:
Your UPDATE command works fine for me even with double quotes...

Does following command work for you?
SELECT * FROM `wp_options` WHERE `option_name` = 'home' OR `option_name` = 'siteurl';

Open in new window

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
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.