执行以下脚本的时候请 先备份数据库!文本存放的新闻正文字段不可用!
新闻正文字段作为主表的情况用以下语句:
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',1),'"',''),'.gif') where newstext like '%.jpg%' and titlepic='';
update phome_ecms_news set titlepic =concat(replace(SUBSTRING_INDEX(SUBSTRING_INDEX(newstext, 'src=', -1),'.png',1),'"',''),'.png') where newstext like '%.png%' and titlepic='';
新闻正文字段作为副表的情况用以下语句:
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;
仿站网下面教大家如何确定站点目标?在创建网站时,决定站点的目标是第一步。设计者应清楚建立站点的目标,即确定它将提供什么样的服务,网页中...
现在很多的企业都是做网站的了,现在的网站建设主要有仿站和全新建站的区别,很多的客户都是会想认为仿站就是抄袭别人的网站的,其实不是这样的,仿...
个人仿站基本各行业都会有,无非就是哪些类型仿的多,哪些类型仿的少而已。下面给大家介绍下一些常见的个人仿站类型。一、流量类站点,一般包括影...
候常用的网页编辑软件有Dreamweaver和FrontPage。FrontPage由Microsoft公司推出,是一个很好的网页制作入门工具,具有与Word相同的操作方式,...
模板加密的不能仿,有一些模板会把一些参数写到JS里面,然后通过复杂的JS控制一些特效和布局这种大部分都有相关的验证,及时本地能运行,但发布到网...
网站的功能是可以仿下来的,只是功能性的东西属于二次开发,不是网站拷贝那么简单。原网站的一些功能开发我们经常遇到的就是培训学员的证书查询...