prepare("UPDATE menu_items SET promotion_id = NULL WHERE promotion_id = ?"); $stmt->execute([$promotion_id]); // Then, delete the promotion $stmt = db()->prepare("DELETE FROM special_promotions WHERE id = ?"); $stmt->execute([$promotion_id]); header('Location: promotions.php'); exit; ?>