SELECT count(goods.id)
FROM goods
INNER JOIN catalog ON catalog.id = goods.parentid
INNER JOIN brands ON brands.id = goods.brand AND brands.ishide = 0
WHERE goods.exist_type != 6 AND goods.goodsid = 0 AND (goods.parentid IN () OR goods.id IN (SELECT goodsid FROM goods_catalogs WHERE parentid IN ()))
Array
(
[0] => 42000
[1] => 1064
[2] => 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 ') OR goods.id IN (SELECT goodsid FROM goods_catalogs WHERE parentid IN ()))' at line 5
)