Lỗi cơ sở dữ liệu.

Error Number: 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 ') GROUP BY `att`.`productsid` HAVING `total` = 2 ORDER BY `pr`.`id`desc' at line 5

SELECT `pr`.`id`, `pr`.`title`, `pr`.`slug`, `pr`.`canonical`, `pr`.`images`, `att`.`productsid`, COUNT(`productsid`) as `total` FROM `attributes_relationship` as `att` INNER JOIN `products` as `pr` ON `pr`.`id` = `att`.`productsid` INNER JOIN `catalogues_relationship` as `rls` ON `pr`.`cataloguesid` WHERE `pr`.`trash` = 0 AND `pr`.`id` = `rls`.`modulesid` AND `rls`.`modules` = 'products' AND `att`.`productsid` = `pr`.`id` AND (`att`.`attrid` = 52 OR `att`.`attrid` = 44) AND (`rls`.`cataloguesid` = ) GROUP BY `att`.`productsid` HAVING `total` = 2 ORDER BY `pr`.`id`desc

Filename: modules/attributes/models/Frontendattributes_model.php

Line Number: 61