''"); foreach ($namelist as &$names){ $names['realname'] = htmlspecialchars_decode($names['realname']); pdo_query("update ".tablename('wwx_fxxt_member')." set nickname = '{$names['realname']}' where id='{$names['id']}'"); } } $wwx_fxxt = pdo_fetch("select `version` from ".tablename('modules')." where `name`='wwx_fxxt'"); if($wwx_fxxt['version']=='5.5.5') { $wechatslist = pdo_fetchall("select * from ".tablename('account_wechats')); foreach ($wechatslist as $wechats) { $total =pdo_fetchcolumn('SELECT count(id) FROM '.tablename('wwx_fxxt_rules')." WHERE uniacid = :uniacid " , array(':uniacid' => $wechats['uniacid']) ); if($total>1) { $items =pdo_fetchall('SELECT * FROM '.tablename('wwx_fxxt_rules')." WHERE uniacid = :uniacid order by id" , array(':uniacid' => $wechats['uniacid']) ); $newitem=''; foreach ($items as $item) { if(empty($newitem)||empty($newitem['id'])) { $newitem=$item; }else { pdo_query("delete from ".tablename('wwx_fxxt_rules')." WHERE uniacid = :uniacid and id!=:id" , array(':uniacid' => $wechats['uniacid'],':id' => $newitem['id'])); } } } } }