Order from Majuro's best
Filter Results
All Restaurants
0) {
$sql .= " HAVING AVG(rt.rating) >= ?";
$params[] = $selected_min_rating;
}
$sql .= " ORDER BY r.name";
$stmt = db()->prepare($sql);
$stmt->execute($params);
$restaurants = $stmt->fetchAll();
if (empty($restaurants)) {
echo '
';
echo '
No restaurants found matching your criteria.
'; } else { foreach ($restaurants as $restaurant) { // Get cuisines for this restaurant $cuisine_sql = "SELECT c.name FROM cuisines c JOIN restaurant_cuisines rc ON c.id = rc.cuisine_id WHERE rc.restaurant_id = ?"; $cuisine_stmt = db()->prepare($cuisine_sql); $cuisine_stmt->execute([$restaurant['id']]); $restaurant_cuisines_list = $cuisine_stmt->fetchAll(PDO::FETCH_COLUMN); echo ''; echo '
';
echo '';
echo '
';
echo '';
}
}
?>
' . htmlspecialchars($restaurant['name']) . '
'; echo '' . htmlspecialchars(implode(', ', $restaurant_cuisines_list)) . '
'; if ($restaurant['rating_count'] > 0) { echo ''; } else { echo ''; } echo '