可以批量提取内容第一张图为标题图,仅供参考,修改之前先备份。
后台-系统-备份与恢复数据-执行SQL语句
UPDATE phome_ecms_news JOIN phome_ecms_news_data_1 ON phome_ecms_news.id = phome_ecms_news_data_1.id SET phome_ecms_news.titlepic = (select reverse(substring(reverse(substring_index(substring(newstext,locate('src=',newstext)+6),'"',1)),2,255)) from phome_ecms_news_data_1 where id=phome_ecms_news.id) WHERE phome_ecms_news.titlepic='';
记得修改数据表名
UPDATE phome_ecms_news SET ispic=1 WHERE titlepic<>'';
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: SQL批量提取帝国CMS内容第一张图为标题图