$meta=$GLOBALS['SITE_DB']->query('SELECT m_table,m_name FROM '.get_table_prefix().'db_meta WHERE '.db_string_equal_to('m_type','MEMBER').' OR '.db_string_equal_to('m_type','?MEMBER').' OR '.db_string_equal_to('m_type','*MEMBER'));
foreach($metaas$m){
$db=get_db_for($m['m_table']);
$db->query_update($m['m_table'],[$m['m_name']=>$to_id],[$m['m_name']=>$from_id],'',null,0,false,true);// Errors suppressed in case rows conflict with existing
$meta=$GLOBALS['SITE_DB']->query('SELECT m_table,m_name FROM '.get_table_prefix().'db_meta WHERE '.db_string_equal_to('m_type','MEMBER').' OR '.db_string_equal_to('m_type','?MEMBER').' OR '.db_string_equal_to('m_type','*MEMBER'));
foreach($metaas$m){
$db=get_db_for($m['m_table']);
$db->query_update($m['m_table'],[$m['m_name']=>$to_id],[$m['m_name']=>$from_id],'',null,0,false,true);// Errors suppressed in case rows conflict with existing
['cns_members_dedup',do_lang('DEDUP_MEMBERS'),'f_members',1000000],// Realistically, there would be very few e-mail address duplicates, and the hook uses intelligent SQL filtering so we aren't processing the full member list