PhpMyadmin MySQL Search and replace

For some weird reason, MyBB’s default edit reason for posts is “Improve grammar”, which makes no sense for an Android forum! So I had to change the string for a lot of users. Manually editing the database is unnecessary!

 

You can exec the following operation in the SQL tab of MySQL:

 

UPDATE `mybb_posts` SET markedit_reason = replace(markedit_reason, “Improve grammar”, “Unspecified reason”);

 

So, format is:

UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring");[/code]

[/code]

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.