7 lines
572 B
PHP
7 lines
572 B
PHP
|
|
<?
|
||
|
|
$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>";
|
||
|
|
}
|
||
|
|
?>
|