Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?php
$db = $GLOBALS['db'];
$query = "SELECT id, ems_qty_in_stock, q3 FROM ecmproducts WHERE deleted=0;";
$result = $db->query($query);
while ($row = $db->fetchByAssoc($result)) {
if ($row['ems_qty_in_stock'] < 3 * $row['q3']) $order=1; else $order=0;
$query="update ecmproducts set to_order=".$order." where id='".$row['id']."'";
if ($db->query($query)) echo ''; else echo 'co<63> nie tak';
//debug
echo $row['ems_qty_in_stock']." - ".$row['q3']." - ".$order."<br>";
}
echo $result->num_rows;
?>