error1: 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 'and m.titulo = ''
group by c.nombre order by m.orden asc' at line 6 sql= select c.*, m.*, c.maps from modelos m join pais p join ciudad c
on m.idciudad = c.id
and c.idpais = p.id
and p.nombre = ''
and m.id_prod =
and m.titulo = ''
group by c.nombre order by m.orden asc