10 lines
449 B
PHP
Executable File
10 lines
449 B
PHP
Executable File
<?
|
|
$GLOBALS['db']->query("truncate table ecmdevices_ecmproducts");
|
|
$w=$GLOBALS['db']->query("select * from pricebookproductrel");
|
|
while($r=$GLOBALS['db']->fetchByAssoc($w)) {
|
|
if($GLOBALS['db']->query("insert into ecmdevices_ecmproducts values('".create_guid()."','".$r['pricebookid']."','".$r['productid']."','0','".$r['listprice']."','1','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','1')"))print "ok";
|
|
else print "no";
|
|
print "<br>";
|
|
}
|
|
?>
|