You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '|| cat_id = (select parent from zadira_cat where id = ))
group by it' at line 6
select *
from zadira_item_group ig,
(
select item_group_id
from zadira_item
where (cat_id = || cat_id = (select parent from zadira_cat where id = ))
group by item_group_id
) igi
where ig.id = igi.item_group_id
order by sort