DEDE数据库语句 DEDESQL命令批量替换 SQL执行语句

1.更改文章中的内容

update dede_addonarticle set body=replace(body,'原来的字符','替换后的字符')

 

例如:update dede_addonarticle set body=replace(body,'音乐下载','音乐试听)


2.更改缩略图目录

SQL命令:update dede_archives set litpic=replace(litpic,'原来的字符','替换后的字符')

 

例如:update dede_archives set litpic=replace(litpic,'uplimg,'tupian')


3.批量替换文章模型中内容部分图片链接路径.

update dede_addonarticle set body=replace(body,'src="http://598080707.net/img/','src="http://598080707.net/images/');

 

例如:把图片路径由原来的http://598080707.net/img/替换成http://598080707.net/images/


4.批量替换文章模型中内容部分超链接.

update dede_addonarticle set body=replace(body,'href="http://www.598080707.net','href="http://598080707.net');

 

例如:把文章模型中的超链接由原来的http://www.598080707.net替换成http://598080707.net


5.批量替换文章模型中内容部分图片锚文本文字.

update dede_addonarticle set body=replace(body,'alt="http://www.598080707.net/','alt="http://598080707.net/');

 

例如:把文章模型中的图片锚文本信息由原来的http://www.598080707.net替换成http://598080707.net


6.批量替换软件模型内容部分超链接

update dede_addonsoft set introduce=replace(introduce,'href="http://www.12215.net/images/QQ598080707/js/ys.html','href="http:/598080707.net/index.html');

 

例如:把软件模型内容中超链接由原来的http://www.12215.net/images/QQ598080707/js/ys.html替换成http:/598080707.net/index.html


7.批量替换文章模型中作者字段

update dede_archives set writer=replace(writer,'http://www.598080707.net','http://598080707.net');

 

例如:把文章模型中的作者由原来的http://www.598080707.net替换成http://598080707.net


8.批量替换文章模型中来源字段

update dede_archives set source=replace(source,'心情驿站 WWW.JINQQ.NET','DEDE技术吧 598080707.NET');

 

例如:把文章模型中的帖子来源由原来的心情驿站 WWW.JINQQ.NET替换成DEDE技术吧 598080707.NET


9.批量替换文章命名规则  

update `dede_arctype` set namerule='{typedir}/{aid}.html';

例如:把站内所有文章模型命名规则全部替换成{typedir}/{aid}.html这样一种形式


10批量替换软件模型演示地址超链接

update dede_addonsoft set writer=replace(officialUrl,'http:/www.12215.net','http://598080707.net');

 

例如:把软件模型原始地址超链接由原来的http:/www.12215.net替换成http://598080707.net

posted @ 2012-03-07 10:26  Mr . Yang  阅读(828)  评论(0编辑  收藏  举报