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 ') AND `catalogue_filters`.`group` != 11 #AND `catalogue_filters`.`group` != 14 ' at line 3 in query: SELECT `catalogue_filters`.`url` FROM `catalogue_filters` INNER JOIN `catalogue_filters_groups` ON `catalogue_filters_groups`.`id` = `catalogue_filters`.`group` WHERE `catalogue_filters`.`id` IN () AND `catalogue_filters`.`group` != 11 #AND `catalogue_filters`.`group` != 14 ORDER BY `catalogue_filters_groups`.`ord` ASC, `catalogue_filters`.`ord` ASC