Global search and replace text in posts Syntax Error
I've done this before. I thought I had the correct code, but I keep getting this error. I'm trying to replace a right arrow ">" without the quotes. Here's what I'm getting now:
SQL query:
UPDATE wp_posts SET post_content = REPLACE(post_content,'>',''); MySQL said: Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
UPDATE wp_posts SET post_content = REPLACE(post_content,'>' at line 1 Thanks for your help.
Thank you for your question about search and replace in SQL. I immediately noticed you have the following in your statement and error:
<p class="code_block">
This "p" tag is HTML code, and should not be part of your SQL query. It is used for formatting code in a paragraph.
If you have any further questions, feel free to post them below.
Thank you,
John-Paul