天空小小岛技术论坛

 找回密码
 注册
搜索
查看: 13470|回复: 0

[使用] Discuz! 6.0 论坛修改 uid 的 SQL 语句

[复制链接]
一粒米 发表于 2010-5-7 23:12:13 | 显示全部楼层 |阅读模式
@fuid 是原 uid
@tuid 是目标 uid

  1. set @fuid = 100;
  2. set @tuid = 1;
  3. select @fuid, @tuid;
  4. update cdb_members set uid = @tuid where uid = @fuid limit 1;
  5. update cdb_memberfields set uid = @tuid where uid = @fuid limit 1;
  6. update cdb_threads set authorid = @tuid where authorid = @fuid;
  7. update cdb_posts set authorid = @tuid where authorid = @fuid;
  8. update cdb_pms set msgfromid = @tuid where msgfromid = @fuid;
  9. update cdb_pms set msgtoid = @tuid where msgtoid = @fuid;
  10. update cdb_application set uid = @tuid where uid = @fuid;
  11. update cdb_threadsmod set uid = @tuid where uid = @fuid;
  12. update cdb_myposts set uid = @tuid where uid = @fuid;
  13. update cdb_mythreads set uid = @tuid where uid = @fuid;
  14. update cdb_attachments set uid = @tuid where uid = @fuid;
  15. update cdb_favorites set uid = @tuid where uid = @fuid;
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|天空小小岛 ( 京ICP备17043412号-1|

GMT+8, 2020-11-27 13:44 , Processed in 0.112933 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表