ENVÍOS GRATIS SOBRE $50.000, SOLO REGIÓN METROPOLITANA

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 'ORDER BY subcategoria_id DESC, categoria_id DESC, linea_id DESC Limit 1' at line 1

SELECT linea_id, categoria_id, subcategoria_id FROM lineas_productos WHERE producto_id = ORDER BY subcategoria_id DESC, categoria_id DESC, linea_id DESC Limit 1