Database Quick Edit

Ash

Madly Diligent
Joined
Nov 14, 2012
Messages
6,011
Reaction score
984
FP$
100
Is there any way where I can perform something on the database to change a word in all posts to something else so for example I can change "This Place" to "That Place" without having to update all posts that contain that phrase
 
Code:
UPDATE mybb_posts SET message = REPLACE(message,'OLD TEXT','NEW TEXT')

Replace OLD TEXT with what you need replaced and replace NEW TEXT with what you want it to be replaced by. Example:

Code:
UPDATE mybb_posts SET message = REPLACE(message,'THIS PLACE','THAT PLACE')

Please note, this will replace all posts with what you type here, so make sure you want every post that contains THIS PLACE to be replaced.

Also, you should check out the Word Filters in MyBB.

ACP > Configuration > Word Filters

This allows you to replace any text a member may write in a post with what you define in the ACP.

Regards.
 
Would that mean if I did what it says above, if there was a post that said:

"I love the new forum. This Place is awesome"
Would that replace the whole message or only "This Place" from that post?
 
Just the "This Place" text. Example:

Before:
http://i.imgur.com/ToJ41Mn.png

After:
http://i.imgur.com/WOuIFKE.png

Be careful though.If you a post that says:
"This place is a great forum"

It will change it to:
"That place is a great forum"

Just so you know. But this is great for changing links or anything like that.

Also, where it says mybb_ - make sure that is your boards prefix in the database. mybb_ is the default value.
 
Back
Top Bottom