Home>Article>CMS Tutorial> How to replace field values in batches in Imperial CMS database

How to replace field values in batches in Imperial CMS database

尚
Original
2019-07-30 14:47:54 4359browse

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

How to replace field values ​​in batches in Imperial CMS database

##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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to update empire cms Next article:How to update empire cms