get( "SELECT l.*, COUNT(b.id) AS building_count FROM locations l LEFT JOIN buildings b ON b.location_id = l.id $where GROUP BY l.id ORDER BY l.name", $types, $params ); $buildings = $sql->get( "SELECT b.id, b.location_id, b.name, b.comment FROM buildings b ORDER BY b.location_id, b.name", "", [] ); $buildingsByLocation = []; foreach ($buildings as $building) { $buildingsByLocation[$building['location_id']][] = $building; } $floors = $sql->get( "SELECT f.id, f.building_id, f.name, f.level FROM floors f ORDER BY f.building_id, f.level", "", [] ); $floorsByBuilding = []; foreach ($floors as $floor) { $floorsByBuilding[$floor['building_id']][] = $floor; } ?>
| Standort | Gebäude | Stockwerk | Details | Aktionen |
|---|---|---|---|---|
| + Gebäude | ||||
| Bearbeiten Löschen + Stockwerk | ||||
| Bearbeiten Löschen | ||||
| Keine Gebäude | ||||
Keine Standorte gefunden.