prepare("UPDATE orders SET status = ? WHERE id = ?"); $stmt->execute([$new_status, $order_id]); header("Location: orders.php"); exit; } $orders = $pdo->query("SELECT o.*, (SELECT GROUP_CONCAT(CONCAT(p.name, ' x', oi.quantity) SEPARATOR ', ') FROM order_items oi JOIN products p ON oi.product_id = p.id WHERE oi.order_id = o.id) as items_summary FROM orders o ORDER BY o.created_at DESC")->fetchAll(); include 'includes/header.php'; ?>

Order Management

Live
ID Source Items Total Status Time Action
# Table
-
No active orders.