📄 membermerge.func.php
字号:
<?php
function getuidfields() {
return array(
'members',
'memberfields',
'access',
'activities',
'activityapplies',
'attachments',
'attachpaymentlog',
'buddys|uid,buddyid',
'creditslog',
'debateposts',
'debates',
'favorites',
'forumrecommend|authorid,moderatorid',
'invites',
'magiclog',
'magicmarket',
'membermagics',
'memberspaces',
'moderators',
'modworks',
'myposts',
'mythreads',
'onlinetime',
'orders',
'paymentlog|uid,authorid',
'pms|msgtoid,msgfromid|pmid',
'posts|authorid|pid',
'promotions',
'ratelog',
'rewardlog|authorid,answererid',
'searchindex|uid',
'spacecaches',
'subscriptions',
'threads|authorid|tid',
'threadsmod',
'tradecomments|raterid,rateeid',
'tradelog|sellerid,buyerid',
'trades|sellerid',
'validating',
'videos',
);
}
function membermerge($olduid, $newuid) {
global $db, $tablepre;
$uidfields = getuidfields();
foreach($uidfields as $value) {
list($table, $field, $stepfield) = explode('|', $value);
$fields = !$field ? array('uid') : explode(',', $field);
foreach($fields as $field) {
$db->query("UPDATE `{$tablepre}$table` SET `$field`='$newuid' WHERE `$field`='$olduid'");
}
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -