Files
crm.twinpol.com/modules/EcmReceipts2/update_address.php

7 lines
572 B
PHP
Raw Normal View History

2025-05-12 15:44:39 +00:00
<?
$w=$GLOBALS[db]->query("select parent_id,id from ecmreceipts where register_date>'2010-01-01' and deleted='0'");
while($r=$GLOBALS[db]->fetchByAssoc($w)){
$rr=$GLOBALS[db]->fetchByAssoc($GLOBALS[db]->query("select * from accounts where id='".$r['parent_id']."'"));
echo "update ecmreceipts set parent_address_street='".$rr['billing_address_street']."',parent_address_city='".$rr['billing_address_city']."',parent_address_postalcode='".$rr['billing_address_postalcode']."',parent_address_country='".$rr['billing_address_country']."' where id='".$r['id']."';<br>";
}
?>