78模板网分享cms建站教程,提供网站模板、网站插件、办公模板等模板教程免费学习,找模板教程就上78模板网!

Discuz教程:discuz批量替换修改门户文章标题内容

我们做论坛网站时,如果网站中需要替换或修改多个文章,就需要使用SQL批量操作。以前我们讲过DZ论坛批量修改已发布贴子内容,今天再来讲一下,Discuz 如何批量修改门户文章标题及内容。

Discuz 批量替换/修改门户文章标题、内容 SQL命令:

批量替换门户文章标题:

UPDATE pre_portal_article_content SET content=REPLACE(subject,'替换前','替换后');

批量替换门户文章内容:

UPDATE pre_portal_article_content SET content=REPLACE(content,'替换前','替换后');

批量替换论坛贴子标题:

UPDATE pre_forum_thread SET subject=REPLACE(subject,'替换前,'替换后');

批量替换论坛贴子内容:

UPDATE pre_forum_post SET message=REPLACE(message,'替换前','替换后');

举例:

UPDATE pre_portal_article_content SET content=REPLACE(content,'<div><embed','<div><embed tt');

UPDATE pre_portal_article_content SET content=REPLACE(content,'height="500">','height="tt500">');

UPDATE pre_portal_article_content SET content=REPLACE(content,'<embed src=','<div><embed src=');

UPDATE pre_portal_article_content SET content=REPLACE(content,'height="500">','height="500"></div><div>一流源码论坛http://www.78moban.cn/</div>');

UPDATE pre_portal_article_content SET aiyiliu.comcontent=REPLACE(content,'<div><embed tt','<div><embed');

UPDATE pre_portal_article_content SET content=REPLACE(content,'height="tt500">','height="500">');

提醒:在进行SQL批量操作前,不要忘记进行网站数据库备份。

本文链接:http://78moban.cn/post/4736.html

版权声明:站内所有文章皆来自网络转载,只供模板演示使用,并无任何其它意义!

联系技术
文章删除 友链合作 技术交流群
1050177837
公众号
公众号
公众号
返回顶部