query("update ecmstockoperations set used=0 where product_id in ( '554','322','360','586')"); $z2=$db->query("select id from ecmproducts where id in ( '554','322','360','586' ) and deleted=0"); while($p=$db->fetchByAssoc($z2)){ $w=$db->query("select id from ecmstocks where deleted='0'"); while($r=$db->fetchByAssoc($w)){ $ss->UpdateStockState($r['id'],$p['id']); echo "updated"; } $w=$db->query("select quantity,stock_name,price,product_code from ecmstockstates where product_id='".$p['id']."' and deleted='0'"); while($s=$db->fetchByAssoc($w)){ echo $s['product_code']." ".$s['stock_name']." ".$s['quantity']." ".$s['price']."
"; } } } ?>