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 'tt2_productos.id IN (SELECT id_producto FROM tt2_productos_caracteristicas_re...' at line 6