Есть сущность с двумя уровнями вложения (скажем так сущность1-> сущность2->сущность3 ).
Пытаюсь формулой вывести сумму значений одного из полей Сущности3 на форму Родительской Сущность1
Выходит ошибка
Код: Выделить всё
Database Error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select func37.id from app_entity_37 func37 where func37.parent_item_id in ) ) a' at line 1
Query: select e.* , ( (select SUM(func.field_385) from app_entity_41 func where func.id>0 and func.parent_item_id=e.id ) ) as field_394, ( (select SUM(func.field_386) from app_entity_41 func where func.id>0 and func.parent_item_id=e.id ) ) as field_395, ( (select SUM(func.field_362) from app_entity_39 func where func.id>0 and func.parent_item_id in (select func41.id from app_entity_41 func41 where func41.parent_item_id in (e.id))(select func37.id from app_entity_37 func37 where func37.parent_item_id in ) ) as field_396 from app_entity_38 e where e.id>0 and e.parent_item_id='1' limit 0, 200
Page: /renewal/index.php?module=items/listing