prepare( 'SELECT r.*, COALESCE(AVG(ra.rating), 0) as rating, COUNT(ra.id) as rating_count ' . 'FROM restaurants r LEFT JOIN ratings ra ON r.id = ra.restaurant_id ' . 'WHERE r.name LIKE ? OR r.cuisine LIKE ? GROUP BY r.id' ); $stmt->execute(['%' . $query . '%', '%' . $query . '%']); $restaurants = $stmt->fetchAll(); } else { $restaurants = []; } ?>

Search Results for ""

No restaurants found.