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,28 @@
<?php
$from = "e2c0a18d-7c8d-cb0e-46ff-5305e3df9d9c";
$to = "a5089802-f543-237f-c7fa-53316fafe922";
$db = $GLOBALS['db'];
$db->query("DELETE FROM ecmprices_ecmproducts WHERE ecmprice_id='$to'");
$res = $db->query("SELECT * FROM ecmpricebooks_ecmproducts WHERE ecmpricebook_id='$from' AND deleted='0'");
while ($row = $db->fetchByAssoc($res)) {
$id = create_guid();
$new[] = $id;
$tmp = array();
$tmp[] = $id;
$tmp[] = $to;
$tmp[] = $row['ecmproduct_id'];
$tmp[] = round(floatval($row['price'])/4,2);
$query = "INSERT INTO ecmprices_ecmproducts (".implode(",", $fields).") VALUES ('".implode("','", $tmp)."')";
$db->query($query);
}
echo 'OK';
?>