select c.id, c.name, c.image_display, (select count(c2.id) from category c2 where c2.parent_id = c.id ) sub_category_count from category c where c.id IN (select c2.id from category c2 where c2.company_id=97) order by c.position asc limit 1
SALADS
سلطة
select *,(SELECT size_layouts_id FROM restaurant WHERE id=97) as size_layouts_id,(SELECT image_display FROM category WHERE id=1291) as image_display from product where status=1 and category_id=1291 order by position ASC