update order error

This commit is contained in:
Flatlogic Bot 2026-04-03 17:11:52 +00:00
parent 4dbf9aec32
commit 8cb3c48ed9
2 changed files with 2 additions and 21 deletions

View File

@ -1,4 +1,6 @@
<?php
// Triggering fresh deployment for HY093 fix
// Triggering fresh deployment for HY093 fix
error_reporting(E_ALL);
ini_set('display_errors', '1');
header('Content-Type: application/json');

View File

@ -1,21 +0,0 @@
<?php
require_once 'db/config.php';
try {
$pdo = db();
$q = "UPDATE orders SET
source = ?,
outlet_id = ?, table_id = ?, table_number = ?, order_type = ?,
customer_id = ?, customer_name = ?, customer_phone = ?, car_plate = ?, ready_time = ?,
payment_type_id = ?, total_amount = ?, discount = ?, vat = ?, user_id = ?,
commission_amount = ?, status = 'pending'
WHERE id = ?";
$stmt = $pdo->prepare($q);
echo "Update params count: " . preg_match_all('/\?/', $q) . "\n";
$q2 = "INSERT INTO orders (source, outlet_id, table_id, table_number, order_type, customer_id, customer_name, customer_phone, car_plate, ready_time, payment_type_id, total_amount, discount, vat, user_id, commission_amount, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'pending')";
$stmt2 = $pdo->prepare($q2);
echo "Insert params count: " . preg_match_all('/\?/', $q2) . "\n";
} catch (Exception $e) {
echo $e->getMessage();
}