hu60wap6管理SQL:合并两个用户;删除用户

@Ta 2020-02-06发布,2023-02-22修改 10201点击

把 uid 23055 的所有数据都合并到 uid 22788:

update hu60_addin_chat_data   set        uid = 22788 where        uid = 23055;
update hu60_bbs_topic_content set        uid = 22788 where        uid = 23055;
update hu60_bbs_topic_meta    set        uid = 22788 where        uid = 23055;
update hu60_book_chapter      set        uid = 22788 where        uid = 23055;
update hu60_book_meta         set        uid = 22788 where        uid = 23055;
update hu60_friend_links      set        uid = 22788 where        uid = 23055;
update hu60_msg               set      touid = 22788 where      touid = 23055;
update hu60_msg               set      byuid = 22788 where      byuid = 23055;
update hu60_token             set        uid = 22788 where        uid = 23055;
update hu60_topic_favorites   set        uid = 22788 where        uid = 23055;
update hu60_user_relationship set origin_uid = 22788 where origin_uid = 23055;
update hu60_user_relationship set target_uid = 22788 where target_uid = 23055;
update hu60_userdata          set        uid = 22788 where        uid = 23055;

把 uid 23055 的用户信息合并到22788,用户名、密码用 23055 的:

delete from hu60_user         where      uid = 22788;
update hu60_user              set        uid = 22788 where        uid = 23055;

删除用户 uid 22788

delete from hu60_addin_chat_data   where        uid = 22788;
delete from hu60_bbs_topic_content where        uid = 22788;
delete from hu60_bbs_topic_meta    where        uid = 22788;
delete from hu60_book_chapter      where        uid = 22788;
delete from hu60_book_meta         where        uid = 22788;
delete from hu60_friend_links      where        uid = 22788;
delete from hu60_msg               where      touid = 22788;
delete from hu60_msg               where      byuid = 22788;
delete from hu60_token             where        uid = 22788;
delete from hu60_topic_favorites   where        uid = 22788;
delete from hu60_user_relationship where origin_uid = 22788;
delete from hu60_user_relationship where target_uid = 22788;
delete from hu60_userdata          where        uid = 22788;
delete from hu60_user              where        uid = 22788;
回复列表(7|隐藏机器人聊天)
  • @Ta / 2020-02-06 / /

    你号没了
    这是一条鸡巴你不必羡慕

  • @Ta / 2020-02-06 / /

    -rainss.cn-雨落凋殇
  • @Ta / 2020-02-06 / /

    演示把老虎合并到我的账号,并使用我的密码
    WAP站长社区(wap.ac

  • @Ta / 2020-02-07 / /

    @呆哥,这样只会失去管理员权限。因为虎绿林只有uid 1具有管理员权限。

  • @Ta / 2020-02-17 / /
    被站长屏蔽
    发言被站长屏蔽,仅管理员和作者本人可见。
  • @Ta / 2020-02-17 / /
    把where条件去掉😀
  • @Ta / 2021-07-20 / /

    @-,昨晚我删除数据时不小心执行成了合并SQL,所以你看到了其他人的内信。我现在已经把示例SQL中的uid改成不存在的uid了,以后不会发生此类事件了。

添加新回复
回复需要登录