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 c.admitido = 1 order by c.dorsal ASC' at line 9
QUERY:
select c.id_concursante, c.dorsal, c.nombre, c.concursante, m.nombre marca, c.modelo, c.junior, c_esp.texto c_esp, c_eus.texto c_eus, c_gui.texto c_gui, g.nombre grupo, c.copiloto from concursantes c left join marca m ON (c.marca = m.id_marca) left join clases c_esp ON (c.c_esp = c_esp.id_clase) left join clases c_eus ON (c.c_eus = c_eus.id_clase) left join clases c_gui ON (c.c_gui = c_gui.id_clase) left join grupos g ON (c.grupo = g.id_grupo) where c.ano = and c.admitido = 1 order by c.dorsal ASC