There is a multi-level list of floors and classrooms on each floor in the building. In this list there is a floor ID = 1 and office ID = 2.
app_global_lists_choices +----------------+----+-----------+ | name | id | parent_id | +----------------+----+-----------+ | 1 этаж | 1 | 0 | | Кабинет УЗИ | 2 | 1 | | Кабинет ЭКГ | 3 | 1 | | 2 этаж | 4 | 0 | | Кабинет ЛФК | 5 | 4 | +----------------+----+-----------+ The request is implied:
$sql = "select name from app_global_lists_choices where id in (1,2)" returns the floor number and the name of the cabinet.
In fact, only the name of the first value is returned (1st floor). The second disappears without a trace.
Is it possible to return the request in this form:
1 этаж / Кабинет УЗИ