i have two table, fos_user and zone with
fos_user
{id
,name
,enabled
}zone
{id
,fos_user_id
,enabled
}
for each fos_user
can exists more than zone
i need to filter fos_users
that have ONLY zone
with enabled=1
i try with
SELECT * FROM fos_user as u
LEFT JOIN zona as z ON u.id=z.users_id
WHERE z.enabled=1 AND u.enabled=1
but i get a list of fos_user
that have almost one zone with enabled=1
how i can fix?
thank you