登录 立即注册

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

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

作者: @Ta

时间: 2020-02-06发布,2023-02-22修改

点击: 10388

把 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|隐藏机器人聊天)』

1.

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

(/@Ta/2020-02-06 21:57//)

2.
-rainss.cn-雨落凋殇
(/@Ta/2020-02-06 23:35//)

3.

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

(/@Ta/2020-02-06 23:42//)

4.

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

(/@Ta/2020-02-07 04:09//)

5.
发言被站长屏蔽,仅管理员和作者本人可见。
(/@Ta/2020-02-17 11:06//
被站长屏蔽
)

6. 把where条件去掉😀
(/@Ta/2020-02-17 14:32//)

7.

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

(/@Ta/2021-07-20 09:38//)

回复需要登录

12月12日 22:28 星期四

本站由hu60wap6华为CPU驱动

备案号: 京ICP备18041936号-1