I currently have the following -
user TABLE
USER_ID, USERNAME, REGION, COUNTRY
region TABLE
REGION_ID, REGION_NAME, COUNTRY_ID
SELECT REGION_NAME, REGION_ID, COUNT(*) AS num_users
FROM region
LEFT JOIN user
ON user.REGION=region.REGION_ID
WHERE region.COUNTRY_ID=$country
GROUP BY region.REGION_ID
ORDER BY region.REGION_NAME"
The problem is that this displays regions with no users as having one user, as well as regions with one user having one user.
Is there any way around this?
Thanks in advance
Nick