Home>Article>CMS Tutorial> How to replace field values in batches in Imperial CMS database
Empire cms batch replacement field value:
Method 1: Column-Other related-Batch replacement field value
Method 2: Replace
UPDATE phome_ecms_news_data_1 SET newstext=REPLACE(newstext,'原来','现在')
through sql Description: phome_ecms_news_data_1 is the data table name, which can be changed to any data table name, and newstext is the field for batch replacement.
To add restrictions to batch replacement, such as: only replace the text newstext with the column ID 1. Can be modified to:
update phome_ecms_news_data_1 set newstext=replace(newstext,'原来','现在') where classid = 1;
Execute SQL statement Location: System>Backup and Restore Data>Execute SQL statement
##Recommended:Empirecms Website building tutorial
The above is the detailed content of How to replace field values in batches in Imperial CMS database. For more information, please follow other related articles on the PHP Chinese website!