操作最好先提前备份一下网站和网站数据库
方法:首先打开网站后台,找到系统—系统设置—备份与恢复数据—执行SQL语句:
新闻正文字段作为主表的情况用以下SQL语句:
update phome_ecms_news set titlepic =concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(newstext, 'src=', -1),'.gif',1),'"',''),'.gif') where newstext like '%.gif%' and titlepic='';update phome_ecms_news set titlepic =concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(newstext, 'src=', -1),'.jpg"language-php">update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.titlepic=concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(a.newstext, 'src=', -1),'.gif',1),'"',''),'.gif') where a.newstext like '%.gif%' and b.titlepic='' and a.id=b.id;update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.titlepic=concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(a.newstext, 'src=', -1),'.jpg',1),'"',''),'.jpg') where a.newstext like '%.jpg%' and b.titlepic='' and a.id=b.id;update [!db.pre!]ecms_news_data_1 a, [!db.pre!]ecms_news b set b.titlepic=concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(a.newstext, 'src=', -1),'.png',1),'"',''),'.png') where a.newstext like '%.png%' and b.titlepic='' and a.id=b.id;
上一篇:帝国cms栏目分页返回第一页去掉index.html方法
下一篇:帝国CMS内容页附件中文显示或者显示代码名称下载
一张图片









