标题: hu60wap6管理SQL:手动关键词屏蔽
时间: 2018-09-03发布,2022-10-29修改
禁言等其他操作:
https://hu60.net/q.php/bbs.topic.80876.html
对特定用户的近期内容进行关键词屏蔽
-- 备注
-- 3600*24*5 表示5天内的发言
-- 16906 和 21134 是uid
-- 单体
update hu60_addin_chat_data set content=replace(content, '替换前', '替换后') where uid in (16906, 21134) and `time` > unix_timestamp()-3600*24*5;
update hu60_bbs_topic_content set content=replace(content, '替换前', '替换后') where uid in (16906, 21134) and mtime > unix_timestamp()-3600*24*5;
-- 批量
update hu60_addin_chat_data set content=
replace(
replace(
content,
'替换前1', '替换后1'),
'替换前2', '替换后2'),
where uid in (
16906, 21134
) and `time` > unix_timestamp()-3600*24*5;
update hu60_bbs_topic_content set content=
replace(
content,
'替换前1', '替换后1'),
'替换前2', '替换后2'),
where uid in (
16906, 21134
) and mtime > unix_timestamp()-3600*24*5;
-- 查询屏蔽效果
select * from hu60_bbs_topic_content where uid in (
16906, 21134
) and mtime > unix_timestamp()-3600*24*5 and (0
or content like '%替换前1%'
or content like '%替换前2%'
);
select * from hu60_addin_chat_data where uid in (
16906, 21134
) and time > unix_timestamp()-3600*24*5 and (0
or content like '%替换前1%'
or content like '%替换前2%'
);
『回复列表(11|隐藏机器人聊天)』