Files
crm.e5.pl/modules/EcmInvoiceOutOlds/update_address.php
2024-04-27 09:23:34 +02:00

7 lines
584 B
PHP

<?
$w=$GLOBALS[db]->query("select parent_id,id from ecminvoiceoutolds 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 ecminvoiceoutolds 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>";
}
?>