SELECT C.restaurant_id AS id, CONCAT(C.nombre,' ',C.sucursal) AS nombre, IFNULL(C.sufijoCatalogo, '') AS suf, IFNULL(C.nomCatalogo, '') AS nomCatalogo FROM s3menudt.clientes C LEFT JOIN parrotweb.options O ON ( O.restId = C.restaurant_id ) WHERE C.restaurant_id IN () AND O.controlCatalogos = 1 ORDER BY suf ASCarray(3) { [0]=> string(5) "00000" [1]=> NULL [2]=> NULL } SQLSTATE[42000]: Syntax error or access violation: 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 ') AND O.controlCatalogos = 1 ORDER BY suf ASC' at line 14array(4) { [0]=> array(6) { ["file"]=> string(54) "/var/www/html/Portales/include/DB/PdoConnectionWeb.php" ["line"]=> int(71) ["function"]=> string(7) "execute" ["class"]=> string(12) "PDOStatement" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(6) { ["file"]=> string(54) "/var/www/html/Portales/include/DB/PdoConnectionWeb.php" ["line"]=> int(92) ["function"]=> string(7) "execute" ["class"]=> string(5) "DbWeb" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [2]=> array(6) { ["file"]=> string(44) "/var/www/html/Portales/include/s3filters.php" ["line"]=> int(57) ["function"]=> string(9) "resultset" ["class"]=> string(5) "DbWeb" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [3]=> array(4) { ["file"]=> string(72) "/var/www/html/Portales/Reportes/RVentas/reporte_ventasSubtotalCombos.php" ["line"]=> int(9) ["args"]=> array(1) { [0]=> string(44) "/var/www/html/Portales/include/s3filters.php" } ["function"]=> string(7) "include" } }