A Database Error Occurred

Error Number: 1064

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 'OR `ade_categories`.`id` IN (SELECT id FROM ade_categories WHERE id_relation = ' at line 5

SELECT `st_store`.`id`, `st_store`.`district`, `st_store`.`profile`, `ade_categories`.`id` AS `id_categoria` FROM st_store JOIN `st_store_categories` ON `st_store_categories`.`id_store` = `st_store`.`id` JOIN `ade_categories` ON `ade_categories`.`id` = `st_store_categories`.`id_category` WHERE (`ade_categories`.`id` = OR `ade_categories`.`id` IN (SELECT id FROM ade_categories WHERE id_relation = )) GROUP BY `st_store`.`district` ORDER BY `st_store`.`district` ASC

Filename: /var/www/html/2019/modules/experiencias/models/Filtros_m.php

Line Number: 163