登录 立即注册

首页 > 绿虎论坛 > 公告 (发帖)

标题: 虎绿林管理SQL:查询已有发言但access=0的用户并将access置为1

作者: @Ta

时间: 03-19 10:11发布,03-19 10:16修改

点击: 4270
被下沉

查询已有发言但access=0的用户

select uid,name from hu60_user where access=0
and
(
  ((select count(*) from hu60_bbs_topic_content where uid=hu60_user.uid) > 0)
  or
  ((select count(*) from hu60_addin_chat_data where uid=hu60_user.uid) > 0)
)

查看这些用户的帖子和回复

select uid,content from hu60_bbs_topic_content where uid in
(
  select uid from hu60_user where access=0
  and
  (
    ((select count(*) from hu60_bbs_topic_content where uid=hu60_user.uid) > 0)
    or
    ((select count(*) from hu60_addin_chat_data where uid=hu60_user.uid) > 0)
  )
)

查看这些用户的聊天室发言

select uid,content from hu60_addin_chat_data where uid in
(
  select uid from hu60_user where access=0
  and
  (
    ((select count(*) from hu60_bbs_topic_content where uid=hu60_user.uid) > 0)
    or
    ((select count(*) from hu60_addin_chat_data where uid=hu60_user.uid) > 0)
  )
)

将这些用户的access置为1

update hu60_user set access=1 where access=0
and
(
  ((select count(*) from hu60_bbs_topic_content where uid=hu60_user.uid) > 0)
  or
  ((select count(*) from hu60_addin_chat_data where uid=hu60_user.uid) > 0)
)

[隐藏样式|查看源码]


『回复列表(1|隐藏机器人聊天)』

1. 这是干啥呀?
(/@Ta/2024-05-10 23:01//)

回复需要登录

11月27日 06:05 星期三

本站由hu60wap6华为CPU驱动

备案号: 京ICP备18041936号-1