如果你想把别的人贴子移到自已名下,或转移给别人,用下面的语句

把用户333所有的贴子转到admin名下

update pre_forum_post set author=replace(author,'333','admin');
update pre_forum_post set authorid=replace(authorid,'4','1');

update pre_forum_thread set author=replace(author,'333','admin');
update pre_forum_thread set authorid=replace(authorid,'4','1');

当跟贴为0时,更改最后发表为新用户名

update pre_forum_thread set lastposter=replace(lastposter,'333','admin');

一次执行

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注