天空小小岛技术论坛

 找回密码
 注册
搜索
天空小小岛技术网站 门户 查看主题

Discuz! 6.0 论坛修改 uid 的 SQL 语句

发布者: 一粒米 | 发布时间: 2010-5-7 23:12| 查看数: 16404| 评论数: 1|帖子模式

@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, 2023-9-27 22:47 , Processed in 0.088821 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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