如何利用数据库sql调取和批量替换内容? DEDE数据库语句 DEDESQL命令批量替换 SQL执行语句 更改文章中的内容update dede_addonarticle set body=replace(body,原来的字符,替换后的字符)例如:update dede_addonarticle set body=replace(body,音乐下载,音乐试听) 更改缩略图目录SQL命令:update dede_archives set litpic=replace(litpic,原来的字符,替换后的字符)例如:update dede_archives set litpic=replace(litpic,uplimg,tupian) 批量替换文章模型中内容部分图片链接路径.update dede_addonarticle set body=replace(body,src=http://*.net/img/,src=http://*.net/images/);例如:把图片路径由原来的http://*.net/img/替换成http://*.net/images/ 批量替换文章模型中内容部分超链接.update dede_addonarticle set body=replace(body,href=http://www.*.net,href=http://*.net);例如:把文章模型中的超链接由原来的http://www.*.net替换成http://*.net 批量替换文章模型中内容部分图片锚文本文字.update dede_addonarticle set body=replace(body,alt=http://www.*.net/,alt=http://*.net/);例如:把文章模型中的图片锚文本信息由原来的http://www.*.net替换成http://*.net 批量替换软件模型内容部分超链接update dede_addonsoft set introduce=replace(introduce,href=http://www.12215.net/images/js/ys.html,href=http:/*.com);例如:把软件模型内容中超链接由原来的http://www.12215.net/images/js/ys.html替换成http://*.com 批量替换文章模型中作者字段update dede_archives set writer=replace(writer,http://www.*.net,http://*.net);例如:把文章模型中的作者由原来的http://www.*.net替换成http://*.net 批量替换文章模型中来源字段update dede_archives set source=replace(source,网站名称 WWW.*.NET,网站名称 *.NET);例如:把文章模型中的帖子来源由原来的网站名称 WWW.*.NET替换成网站名称 *.NET 批量替换文章命名规则 http://www.*.com/update `dede_arctype` set namerule={typedir}/{aid}.html;例如:把站内所有文章模型命名规则全部替换成{typedir}/{aid}.html这样一种形式 批量替换软件模型演示地址超链接update dede_addonsoft set writer=replace(officialUrl,http:/www.*.net,http://*.net);例如:把软件模型原始地址超链接由原来的http:/www.*.net替换成http://*.net |