SELECT COUNT(`catalog`.id) + (SELECT COUNT(`id`) FROM `catalog` WHERE `id` IN(SELECT `main_id` FROM `group_id` WHERE `subs` = )) `total` FROM `catalog` WHERE `catalog`.sub_id = AND `catalog`.active_1 = 1 ORDER BY `catalog`.exist ASC, `catalog`.pos ASC124You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')) `total` FROM `catalog` WHERE `catalog`.sub_id = AND `catalog`.a' at line 2