天空小小岛技术论坛

 找回密码
 注册
搜索
查看: 16793|回复: 0
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
一粒米 发表于 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备2025130156号|

GMT+8, 2025-6-21 07:58 , Processed in 0.120613 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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