sermon/backend/api/getRooms.php

16 lines
230 B
PHP
Raw Normal View History

2020-05-08 17:55:57 +02:00
<?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);
?>