Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Местоположение и названия комнат #703

Open
kirush0280 opened this issue Mar 6, 2020 · 1 comment
Open

Местоположение и названия комнат #703

kirush0280 opened this issue Mar 6, 2020 · 1 comment

Comments

@kirush0280
Copy link
Contributor

kirush0280 commented Mar 6, 2020

При изменении названия комнаты, не производится замена linkedRooms в свойствах объекта которые привязаны к этой комнате.

@kirush0280 kirush0280 changed the title Простые устройства. Местоположение и названия комнат Местоположение и названия комнат Mar 6, 2020
@SergMicar
Copy link
Contributor

Можно извлекать название "реально привязанной" комнаты не зависимо от свойства linkedRooms так:
function getLocationById($location_id) {
$res = sqlselectone("select * from locations where id=".$location_id);
//Array ( [ID] => 4 [TITLE] => Livingroom [PRIORITY] => 0 )
$room = $res['TITLE'];
return $room;
}

$obj = getobject("название обьекта");
$location_id = $curobj->location_id;
$linkedRoom = getLocationById($location_id);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants