SELECT
GROUP_CONCAT(ad024entidadesmunicipios.ad024IdMunicipio SEPARATOR ',' ) as ListaIdMun,
GROUP_CONCAT(ad020municipios.ad020CIFAyto SEPARATOR '","') AS CIFs,
GROUP_CONCAT(ad020municipios.ad020Municipio SEPARATOR '","' ) AS Nombres,
ma017Coordenadas as LatLangGMaps,
ma017Zoom as ZoomGMaps
FROM
ad001entidades
INNER JOIN ad024entidadesmunicipios ON ad024entidadesmunicipios.ad024IdEntidad = ad001entidades.ad001Id
INNER JOIN ad020municipios ON ad020municipios.ad020Id = ad024entidadesmunicipios.ad024IdMunicipio
LEFT JOIN ma017gmaps ON ma017IdCentro =
WHERE
ad001entidades.ad001Id =
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 'WHERE
ad001entidades.ad001Id =' at line 12