PDA

View Full Version : Find and replace query


decipher442
02-12-2010, 02:33 PM
Hi,

I was wondering is there was some sort of an sql query I could run through the admin panel to find and replace test on the site...

In short I merged another forum into mine and not I would like to replace the "old-forum.com" text in all the posts, hopefully by running a query instead of opening each and every post to edit the text to my current domain.

making any sense?

--------------- Added 1266007312 at 1266007312 ---------------

anyone know the solution to this?

decipher442
02-14-2010, 12:22 AM
I assume that there is no solution to this..?

Dylanblitz
02-14-2010, 07:29 PM
I don't think there is a way to do it inside of the forums.

If it was me I'd run a replace command through phpmyadmin or export, replace and import.

Andy
02-16-2010, 10:20 AM
Admin CP -> Maintenance -> Execute SQL Query

UPDATE post SET pagetext = REPLACE(pagetext, 'old-forum.com', 'new-forum.com')

Be sure to do a backup first just in case you make a mistake.