La consulta falló: 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 '{{id}}} ORDER BY te.ano DESC, dataI DESC, (te.fase + te.tipo) desc, e.tipo DESC,' at line 14