This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
<?php
$w=$GLOBALS['db']->query("select id,account_id from ecmpricebooks where deleted='0'");
while($r=$GLOBALS['db']->fetchByAssoc($w)){
$ww=$GLOBALS['db']->query("select ecmproduct_id from ecmpricebooks_ecmproducts where deleted='0' and ecmpricebook_id='".$r['id']."'");
while($rr=$GLOBALS['db']->fetchByAssoc($ww)){
if(mysql_num_rows($GLOBALS['db']->query("select id from accounts_ecmproducts where account_id='".$r['account_id']."' and ecmproduct_id='".$rr['ecmproduct_id']."' and deleted='0'"))==0){
$GLOBALS['db']->query("insert into accounts_ecmproducts set id='".create_guid()."',account_id='".$r['account_id']."',ecmproduct_id='".$rr['ecmproduct_id']."',date_modified='".date("Y-m-d H:i:s")."',deleted='0'");
}
}
}
?>