prepare("SELECT sp.* FROM special_promotions sp JOIN menu_items mi ON sp.id = mi.promotion_id JOIN restaurants r ON mi.restaurant_id = r.id WHERE r.id = ?"); $stmt->execute([$restaurant_id]); $promotions = $stmt->fetchAll(); ?>
| Name | Description | Discount | Start Date | End Date | Active | Actions |
|---|---|---|---|---|---|---|
| = htmlspecialchars($promotion['name']) ?> | = htmlspecialchars($promotion['description']) ?> | = htmlspecialchars($promotion['discount_value']) ?> = $promotion['discount_type'] == 'percentage' ? '%' : '' ?> | = htmlspecialchars($promotion['start_date']) ?> | = htmlspecialchars($promotion['end_date']) ?> | = $promotion['is_active'] ? 'Yes' : 'No' ?> | Edit Delete |