根据下面的SQL语句和实际使用情况修改字段名称和要替换的内容就好了,语句如下:
update phome_ecms_news set titleurl=replace(titleurl,'http://www.duanjingdian.com','http://127.0.0.1');
update phome_ecms_news set titlepic=replace(titlepic,'http://www.duanjingdian.com','http://127.0.0.1');
update phome_ecms_news set username=REPLACE(username,'admin','发布者') WHERE id BETWEEN 1 AND 100; //指定批量修改ID=1-100;
update phome_ecms_news set userid=REPLACE(userid,'1','55'),username=REPLACE(username,'admin','改变'),ismember=REPLACE(ismember,'0','1') WHERE id BETWEEN 1 AND 100; //一次批量替换三个字段中的内容
后台的执行SQL语句中执行,一键替换。
本文摘自网络,不代表短经典网立场 https://www.duanjingdian.com/462.html