sermon/backend/api/getRooms.php
2020-05-08 17:55:57 +02:00

16 lines
No EOL
230 B
PHP

<?php
$statement = $database->prepare('
SELECT *
FROM rooms
WHERE is_active = 1
')->execute();
$rooms = [];
while ($row = $statement->fetchArray(SQLITE3_ASSOC)) {
$rooms[] = $row;
}
echo json_encode($rooms);
?>