$defaultRoom=Db::loadOne("SELECT room_id FROM rooms WHERE 'default' = 1");
return$defaultRoom['room_id'];
}
staticfunctiongetAllRooms(){
$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");
$allRoom=Db::loadAll("SELECT rooms.room_id, rooms.name, COUNT(devices.device_id) as device_count FROM rooms LEFT JOIN devices ON (devices.room_id=rooms.room_id) GROUP BY rooms.room_id;");