SQL SELECT GROUP_CONCAT(DISTINCT(p.rowid)) as id_products
                FROM llx_product p
               INNER JOIN llx_categorie_product cp ON cp.fk_product = p.rowid
                 INNER JOIN llx_subfiltro_productos sp0
                            ON sp0.id_producto = p.rowid

                WHERE  sp0.id_subfiltro = (SELECT rowid FROM llx_subfiltro WHERE url = 'native-instruments' AND id_filtro=) AND 
                    p.dw_visible = 1 AND p.dw_validado = 1 AND p.dw_ecommerce = 1 AND p.dw_eliminado = 0 
                    AND cp.fk_categorie = 148
Error 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 ') AND p.dw_visible = 1 AND p.dw_validado = 1 AND p.dw_ecom' at line 7
END