论坛转换网's Archiver

自由者cg 发表于 2019-11-12 15:14

discuz某个版块标题批量增加同一字段

如题,求教乐天大大,想给某个版块内的所有主题,增加或去除相同文字,如何操作?

白乐天 发表于 2019-11-15 10:11

[b] [url=http://www.bbstobbs.com/redirect.php?goto=findpost&pid=14358&ptid=12139]1#[/url] [i]自由者cg[/i] [/b]


update pre_forum_thread set subject = REPLACE(subject , '想去掉的文字','') where fid = 9999;

9999替换成你的版块fid。如无把握请提前备份

自由者cg 发表于 2019-11-20 10:02

[b] [url=http://www.bbstobbs.com/redirect.php?goto=findpost&pid=14359&ptid=12139]2#[/url] [i]白乐天[/i] [/b]


非常感谢答复!我实际是想增加文字(非去除),如何实现呢?

白乐天 发表于 2019-11-23 00:08

[quote] 2# 白乐天


非常感谢答复!我实际是想增加文字(非去除),如何实现呢?
[size=2][color=#999999]自由者cg 发表于 2019-11-20 10:02[/color] [url=http://www.bbstobbs.com/redirect.php?goto=findpost&pid=14360&ptid=12139][img]http://www.bbstobbs.com/images/common/back.gif[/img][/url][/size][/quote]


update pre_forum_thread set subject =  '标题前加文字' +subject where fid = 9999;
update pre_forum_thread set subject = subject +  '标题后加文字'  where fid = 9999;
9999替换成你的版块fid

自由者cg 发表于 2019-12-11 14:01

[b] [url=http://www.bbstobbs.com/redirect.php?goto=findpost&pid=14361&ptid=12139]4#[/url] [i]白乐天[/i] [/b]


非常感谢!:victory:

页: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.