M1850资源网 - 最专业的网站源码模板下载站!

全部作品
全部作品
织梦模板
网站模板
源码插件
游戏源码
脚本特效
视频教程
建站教程
M1850资源网 > 建站教程 > discuz教程 > Discuz 批量替换/修改门户文章标题、内容

推荐下载

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

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

dz

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>学做网站论坛https://www.xuewangzhan.net/</div>');

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

提醒:在进行SQL批量操作前,不要忘记进行网站数据库备份。更多DISCUZ批量操作方法,请参考DISCUZ论坛常用批量修改SQL语句汇总。

嘿,我来帮您!

展开