select count(*) as c from product as p where ((exists(select 1 from category where category.id in () and exists(select 1 from webe_catalog where p.webe_catalog_id=webe_catalog.id and p.webe_catalog_id=webe_catalog.id and EXISTS( select 1 from category_webe_catalog where category_webe_catalog.webe_catalog_id=webe_catalog.id and category_webe_catalog.category_id=category.id)))) or (false))SQLSTATE[42000]: Syntax error or access violation: 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 ') and exists(select 1 from webe_catalog where p.webe_catalog_id=webe_ca' at line 2