16 lines
230 B
PHP
16 lines
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);
|
||
|
|
||
|
?>
|