query("SELECT b.*, p.name as pname, c.name as cname, cu.name as customer_name, cu.email as customer_email, cu.phone as customer_phone FROM bookings b JOIN packages p ON b.package_id=p.id JOIN categories c ON b.category_id=c.id JOIN customers cu ON b.customer_id=cu.id ORDER BY b.created_at DESC")->fetch_all(MYSQLI_ASSOC); ?>
| ID | Booking# | Customer | Package | Date | Total | Status | Payment | Action |
|---|---|---|---|---|---|---|---|---|
| = $b['id'] ?> | = $b['booking_id'] ?> | = htmlspecialchars($b['customer_name']) ?> = $b['customer_phone'] ?> |
= $b['pname'] ?> | = date('d M Y', strtotime($b['event_date'])) ?> | = formatPrice($b['total_price']) ?> | = getStatusBadge($b['status']) ?> | = getStatusBadge($b['payment_status']) ?> |