7 lines
380 B
PHP
Executable File
7 lines
380 B
PHP
Executable File
<?
|
|
$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']."'");
|
|
}
|
|
?>
|