From: Marina Zozirova Date: Sat, 27 Apr 2024 12:41:32 +0000 (+0000) Subject: insert ignore c mysql переведен postgresql X-Git-Tag: 1.1~96^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e41b9d0714708e767248cd1b0682767499c15f9a;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 83c10780..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 IGNORE INTO store_order_status_log (status, order_id, date, admin_id) VALUES (?,?,NOW(),?)",[(int)$_POST["status_new"],$orderId, $_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("Статус изменен"); }