How to replace the post content in batches by Discuz (use SQL to update the database ). Today, a friend's DiscuzX2 forum needs to replace the content of posts in batches. There are tens of thousands of posts. in the beginning, words are filtered and no effect is found, you can only use the database to replace the content of a friend's Discuz X2 Forum in batches. the number of posts is tens of thousands. in the beginning, you can set word filtering to find that there is no effect, you can only replace the database in batches. For more information, see.
The Discuz X2 Forum provides the Database SQL statement operation function in the background. However, this function is disabled by default for security reasons. you must modify the configuration file as follows:
Find the Forum program file config/config_global.php, open the file in notepad, and find $ _ config ['security'] ['querysafe '] ['status'] to set it to 0, continue to search for $ _ config ['admincp'] ['runquery'] and set it to 1. (For security reasons, we recommend that you change the values of these two parameters after the SQL statement is executed)
The following describes how to modify the content of Discuz X2 in batches:
1. go to the Discuz X2 backend → webmaster → database → upgrade
2. enter the following statement and submit it:
The code is as follows:
UPDATE pre_forum_post SET message = REPLACE (message, "" content to be replaced "", "" new content "");
Forum X2 needs to replace the content of posts in batches. the number of posts is tens of thousands. in the beginning, words are filtered and no effect is found. you can only replace the content in batches in the database...