Hello friends, Maybe someone can help me with this... I need to replace a long text that I have in about 10.000 posts in my site. But I don't know If I can use the REPLACE query to do that. I use that query to replace some words, or little things, but never long texts. It is possible? I tried but didn't work. Maybe I am doing something wrong... This is the query that I'm using: UPDATE table_name set table_field = REPLACE (table_field, ‘replace_that’, ‘with_this’); Code (markup): The problem is the text have breaklines, html codes, etc... Take a look of an text example: This is the query that I tried: UPDATE wp_posts SET post_content = REPLACE (post_content,'<strong>TEXT TITLE</strong> <span style="font-weight: bold; color: #0000FF;">xxxxxxxxxxxxxxxxxxx: - yyyyyyyyyyyyyyyy - yyyyyyyyyyyyyyyy - yyyyyyyyyyyyyyyy - yyyyyyyyyyyyyyyy <span style="font-weight: bold; color: #0000FF;">xxxxxxxxxxxxxxxxxxx 2: 1- yyyyyyyyyyyyyyyy 2- yyyyyyyyyyyyyyyy 3- yyyyyyyyyyyyyyyy 4- yyyyyyyyyyyyyyyy </span>','coming...') Code (markup): Can someone help me? Thank you
I would suggest you to take help of php here. Write a small script which reads data from table, replaces the text and updates back the row. This can be done using MYSQL as well, but its safer to do with php as you can do much debug and better replace there.