<?
$GLOBALS['db']->query("truncate table ecmpricebooks_ecmproducts");
$w=$GLOBALS['db']->query("select * from pricebookproductrel");
while($r=$GLOBALS['db']->fetchByAssoc($w)) {
	if($GLOBALS['db']->query("insert into ecmpricebooks_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>";
}
?>
