From: marina Date: Sat, 27 Apr 2024 12:18:39 +0000 (+0300) Subject: insert ignore c mysql переведен postgresql правки X-Git-Tag: 1.1~89^2~3 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=10a1e985f9b871cfd72006ae45940ded161c0726;p=erp24_rep%2Fyii-erp24%2F.git insert ignore c mysql переведен postgresql правки --- diff --git a/erp24/modul/shipment/shipment.php b/erp24/modul/shipment/shipment.php index fff79852..f3ddcef1 100644 --- a/erp24/modul/shipment/shipment.php +++ b/erp24/modul/shipment/shipment.php @@ -20,7 +20,7 @@ if(!empty($_REQUEST["id"])) { $orderId=(int)$_REQUEST["id"]; } else exit("Ука // измененеи статуса заказа if(!empty($_POST["edit_status"]) and !empty($_REQUEST["id"])) { $db::sql("UPDATE store_orders SET status=? WHERE id=?",[(int)$_POST["status_new"],$orderId]); -$db::sql('INSERT INTO store_order_status_log (status, order_id, date, admin_id) VALUES (?, NOW(), ?) ON CONFLICT (status, order_id, admin_id) DO UPDATE SET status = ' . (int)$_POST["status_new"] . ', order_id = ' . $orderId . ', admin_id = ' . $_SESSION["admin_id"]); +$db::sql('INSERT INTO store_order_status_log (status, order_id, date, admin_id) VALUES (' . (int)$_POST["status_new"] . ', ' . (int)$orderId . ', NOW(), ' . $_SESSION["admin_id"] . ') ON CONFLICT (id) DO UPDATE SET status = ' . (int)$_POST["status_new"] . ', order_id = ' . (int)$orderId . ', date = NOW(), admin_id = ' . $_SESSION["admin_id"]); mess("Статус изменен"); }