2

I use this to replace \" with " :

UPDATE wp_posts SET post_content = REPLACE (post_content, '\"', '"')

That query returns 0 row(s) affected and nothing happens.

What is wrong this this query?

3 Answers 3

5

You need to escape your backslash:

UPDATE wp_posts SET post_content = REPLACE (post_content, '\\"', '"')
Sign up to request clarification or add additional context in comments.

Comments

1

The backslash charecter is escape character in MySQL so you need to escape it itself like this:

UPDATE wp_posts SET post_content = REPLACE(post_content, '\\"', '"')

Comments

1

use:

REPLACE(`post_content`, '\\"', '"')

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.