Hi
I have two MySQL databases, on for aeromodelistas (aeromodelling) and
another for Códigos Postais (Postal Codes). I whant to do the
following query
SELECT CódigoPostal FROM Aeromodelistas
WHERE CódigoPostal IN
(SELECT distinct(CP4) FROM codigopostal.LOCART,codigopostal.DISTRITO
WHERE
This is what I use when needing to do this:
1. Put all the values you want to search for in an array $vals (loop
around the first result)
2. $query =
select count(Nome) from Aeromodelistas
where year(AnoQuota)=2005
and Sexo='Masculino' and Distrito IN .sqlIn($vals)
;
function