PDA

View Full Version : This will work right?


dutchbb
06-22-2014, 09:39 AM
UPDATE thread
SET title = REPLACE(title, '++++','****')

UPDATE post
SET pagetext = REPLACE(pagetext, '++++','****')

Obviously I want to replace the f-word shown as ++++ here, in the database with asterisks, just wanted to have the query checked to be sure.

Additional question: can I do this without overloading the page for manual queries in ACP? It's an 8 million post database on an owned server with only this one forum running.

Dave
06-22-2014, 10:16 AM
That should work yes, but you should always make a backup before doing a risky UPDATE statement.

It's hard to say if the server gets overloaded, it kind of depends on the server specifications and the configuration of the MySQL server.

dutchbb
06-22-2014, 10:19 AM
Ok tried it, titles work, posts takes too long (504 error). I've got the backup. Thanks Dave

Dave
06-22-2014, 10:22 AM
Ok tried it, titles work, posts takes too long (504 error). I've got the backup. Thanks Dave

In case you're on a VPS or dedicated server, login into mysqladmin on the server and execute i t there. That way you will not face a timeout.

dutchbb
06-22-2014, 11:52 AM
Yes works, tnx again

webmastersun
06-22-2014, 02:39 PM
you can make your forum broken by changing like that :)