Jump to content

Find/Replace Text in Posts - SQL?


Matt Johnson

Recommended Posts

Posted

Should be something like this ..

UPDATE table

SET column = REPLACE( column, 'xxxxx.com', 'yyyyy.com')

WHERE column like '%xxxxx.com%';

​Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.

Posted

​Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.

​Yes. You will have to find the right table and column but it will replace anything that matches that string value.

Posted

​Would this replace the actual text in the posts? That is what I am trying to change. The board migrated over to the new URL fine and I updated the global file. No issues there. I am trying to change any text/links that people posted referencing the old domain. In theory, the 301 redirect should cover it, but I'd like to clean it up if possible.

​Yes. You will have to find the right table and column but it will replace anything that matches that string value.

Yes. Same what he said .. If you not feel so familiar with MySQL, please make a test database first with a simple table where you can test this replacement function first, and check the result ..

 

.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...