mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Static ip generator :)
This commit is contained in:
1 parent
9e6968bf6c
commit
7337e3c7d9
5 files changed
+28
No files matched your search
@@ -2,6 +2,11 @@
|
||||
class RoomManager{
|
||||
public static $rooms;
|
||||
|
||||
function getDefaultRoomId() {
|
||||
$defaultRoom = Db::loadOne("SELECT id FROM rooms WHERE default = 1");
|
||||
return $defaultRoom['id'];
|
||||
}
|
||||
|
||||
function getAllRooms () {
|
||||
$allRoom = Db::loadAll ("SELECT rooms.*, COUNT(devices.device_id) as device_count FROM rooms LEFT JOIN devices ON (devices.room_id=rooms.room_id) GROUP BY rooms.room_id");
|
||||
return $allRoom;
|
||||
|
||||
Reference in new issue
Block a user