7 lines
386 B
PHP
7 lines
386 B
PHP
|
|
<?
|
||
|
|
$w=$GLOBALS['db']->query("select id,vat_value from ecmproducts");
|
||
|
|
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||
|
|
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,name from ecmvats where value='".$r['vat_value']."' and deleted='0'"));
|
||
|
|
$GLOBALS['db']->query("update ecmproducts set vat_name='".$rr['name']."',vat_id='".$rr['id']."' where id='".$r['id']."'");
|
||
|
|
}
|
||
|
|
?>
|