灰儿 发表于 2012-5-7 19:21:52

改DX2.0用户的UID的方法

需要修改的数据表与字段值分别为:

修改 pre_forum_thread 表中 author 和 authorid 的值。
修改pre_forum_post表中 author 和 authorid 的值。

pre_forum_post表中author值为主题贴对应的用户名
pre_forum_post表中authorid值为主题贴对应的UID号


在 pre_forum_post 表中执行:
SELECT * FROM`pre_forum_post` WHERE tid ="xxx" and first=“1”
xxx代表你要修改的tid,搜到后,修改其中的 author 和 authorid 为你所需要的!
就行了!!!!


YCMM提供 X2 修改UID执行命令代码:
http://www.discuz.net/thread-2187507-1-1.html


UPDATE `pre_common_member` set uid=88888 WHERE uid=1;
UPDATE `pre_common_session` set uid=88888 WHERE uid=1;
UPDATE `pre_common_member_count` set uid=88888 WHERE uid=1;
UPDATE `pre_common_member_field_forum` set uid=88888 WHERE uid=1;
UPDATE `pre_common_member_field_home` set uid=88888 WHERE uid=1;
UPDATE `pre_common_member_profile` set uid=88888 WHERE uid=1;
UPDATE `pre_common_member_status` set uid=88888 WHERE uid=1;
UPDATE `pre_common_statuser` set uid=88888 WHERE uid=1;
UPDATE `pre_forum_post` set fid=88888 WHERE fid=1;
UPDATE `pre_forum_post` set authorid=88888 WHERE authorid=1;
UPDATE `pre_forum_thread` set fid=88888 WHERE fid=1;
UPDATE `pre_forum_thread` set authorid=88888 WHERE authorid=1;
UPDATE `pre_forum_groupuser` set uid=88888 WHERE uid=1;
UPDATE `pre_forum_groupuser` set fid=88888 WHERE fid=1;
UPDATE `pre_ucenter_friends` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_friends` set friendid=88888 WHERE friendid=1;
UPDATE `pre_ucenter_memberfields` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_memberfields` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_members` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_pms` set msgfromid=88888 WHERE msgfromid=1;
UPDATE `pre_ucenter_pms` set msgtoid=88888 WHERE msgtoid=1;
UPDATE `pre_home_friend` set uid=88888 WHERE uid=1;
UPDATE `pre_home_friend` set fuid=88888 WHERE fuid=1;
UPDATE `pre_home_friendlog` set uid=88888 WHERE uid=1;
UPDATE `pre_home_friendlog` set fuid=88888 WHERE fuid=1;
UPDATE `pre_home_notification` set uid=88888 WHERE uid=1;
如上面演示:88888是你想要的UID号码,1是你现在的UID号码,
修改数据库有一定的风险,请不要乱用,执行前请备份数据,更不要拿管理员号码作为测试!

YCMM网站地址:http://www.ycmm.me

代码详解:
UPDATE `pre_common_member` set uid=88888 WHERE uid=1;修改用户名UID号
UPDATE `pre_common_session` set uid=88888 WHERE uid=1;修改缓存
UPDATE `pre_common_member_count` set uid=88888 WHERE uid=1;修改此UID关联的积分
UPDATE `pre_common_member_field_forum` set uid=88888 WHERE uid=1;修改此UID关联的个性签名
UPDATE `pre_common_member_field_home` set uid=88888 WHERE uid=1;修改此UID关联的家园记录
UPDATE `pre_common_member_profile` set uid=88888 WHERE uid=1;    修改此UID关联的个人认证信息
UPDATE `pre_common_member_status` set uid=88888 WHERE uid=1;   修改此UID关联的个人基本状态
UPDATE `pre_common_statuser` set uid=88888 WHERE uid=1;       修改此UID关联的用户登录时间
UPDATE `pre_forum_post` set fid=88888 WHERE fid=1;      修改版块ID号,感觉不应该操行此行代码?
UPDATE `pre_forum_post` set authorid=88888 WHERE authorid=1;    修改此UID关联的回贴
UPDATE `pre_forum_thread` set fid=88888 WHERE fid=1;修改版块ID号,感觉不应该操行此行代码?
UPDATE `pre_forum_thread` set authorid=88888 WHERE authorid=1;   修改此UID关联的主题贴
UPDATE `pre_forum_groupuser` set uid=88888 WHERE uid=1;
UPDATE `pre_forum_groupuser` set fid=88888 WHERE fid=1;
UPDATE `pre_ucenter_friends` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_friends` set friendid=88888 WHERE friendid=1;
UPDATE `pre_ucenter_memberfields` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_memberfields` set uid=88888 WHERE uid=1;   与上一条命令重复
UPDATE `pre_ucenter_members` set uid=88888 WHERE uid=1;
UPDATE `pre_ucenter_pms` set msgfromid=88888 WHERE msgfromid=1;   在UC中没有此表
UPDATE `pre_ucenter_pms` set msgtoid=88888 WHERE msgtoid=1;
UPDATE `pre_home_friend` set uid=88888 WHERE uid=1;
UPDATE `pre_home_friend` set fuid=88888 WHERE fuid=1;
UPDATE `pre_home_friendlog` set uid=88888 WHERE uid=1;
UPDATE `pre_home_friendlog` set fuid=88888 WHERE fuid=1;
UPDATE `pre_home_notification` set uid=88888 WHERE uid=1;




灰儿 发表于 2012-5-7 19:36:29

运行下面的代码,这样就可以把DX2.0中uid1055的所有资料 包括贴子什么的 全部改成 uid6的

UPDATE `pre_common_member` set uid=6 WHERE uid=1055;
UPDATE `pre_common_session` set uid=6 WHERE uid=1055;
UPDATE `pre_common_member_count` set uid=6 WHERE uid=1055;
UPDATE `pre_common_member_field_forum` set uid=6 WHERE uid=1055;
UPDATE `pre_common_member_field_home` set uid=6 WHERE uid=1055;
UPDATE `pre_common_member_profile` set uid=6 WHERE uid=1055;
UPDATE `pre_common_member_status` set uid=6 WHERE uid=1055;
UPDATE `pre_common_statuser` set uid=6 WHERE uid=1055;
UPDATE `pre_forum_post` set fid=6 WHERE fid=1055;
UPDATE `pre_forum_post` set authorid=6 WHERE authorid=1055;
UPDATE `pre_forum_thread` set fid=6 WHERE fid=1055;
UPDATE `pre_forum_thread` set authorid=6 WHERE authorid=1055;
UPDATE `pre_forum_groupuser` set uid=6 WHERE uid=1055;
UPDATE `pre_forum_groupuser` set fid=6 WHERE fid=1055;
UPDATE `pre_ucenter_friends` set uid=6 WHERE uid=1055;
UPDATE `pre_ucenter_friends` set friendid=6 WHERE friendid=1055;
UPDATE `pre_ucenter_memberfields` set uid=6 WHERE uid=1055;
UPDATE `pre_ucenter_memberfields` set uid=6 WHERE uid=1055;
UPDATE `pre_ucenter_members` set uid=6 WHERE uid=1055;
UPDATE `pre_ucenter_pms` set msgfromid=6 WHERE msgfromid=1055;
UPDATE `pre_ucenter_pms` set msgtoid=6 WHERE msgtoid=1055;
UPDATE `pre_home_friend` set uid=6 WHERE uid=1055;
UPDATE `pre_home_friend` set fuid=6 WHERE fuid=1055;
UPDATE `pre_home_friendlog` set uid=6 WHERE uid=1055;
UPDATE `pre_home_friendlog` set fuid=6 WHERE fuid=1055;
UPDATE `pre_home_notification` set uid=6 WHERE uid=1055;

灰儿 发表于 2012-6-19 22:03:21

UPDATE `pre_common_session` set uid=24 WHERE uid=66;
UPDATE `pre_common_member_count` set uid=24 WHERE uid=66;
UPDATE `pre_common_member_field_forum` set uid=24 WHERE uid=66;
UPDATE `pre_common_member_field_home` set uid=24 WHERE uid=66;
UPDATE `pre_common_member_profile` set uid=24 WHERE uid=66;
UPDATE `pre_common_member_status` set uid=24 WHERE uid=66;
UPDATE `pre_common_statuser` set uid=24 WHERE uid=66;
UPDATE `pre_forum_post` set authorid=24 WHERE authorid=66;
UPDATE `pre_forum_thread` set authorid=24 WHERE authorid=66;

页: [1]
查看完整版本: 改DX2.0用户的UID的方法