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 'order by s.orden ASC
limit 1' at line 5
QUERY:
select s.id_seccion, s.web
from secciones s, secciones_ano sa
where s.id_seccion = sa.id_seccion
and sa.ano =
order by s.orden ASC
limit 1