天空小小岛技术网站

标题: Discuz! 6.0 论坛修改 uid 的 SQL 语句 [打印本页]

作者: 一粒米    时间: 2010-5-7 23:12
标题: Discuz! 6.0 论坛修改 uid 的 SQL 语句
@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;
复制代码





欢迎光临 天空小小岛技术网站 (http://tkxxd.net/) Powered by Discuz! X3.1