If a user could belong to only one group, it wouldn't be so hard. But your situation is trickier. The SQL query you want, basically, is:
'SELECT * FROM users WHERE users.id NOT IN (SELECT DISTINCT users_groups.user_id FROM users_groups WHERE users_groups.group_id = $groupID)
I do not think you can do that directly with find(), but if you don't mind an intermediate step, you can at least get your result.
Main Topics
Browse All Topics





by: BrianGEFF719Posted on 2009-03-28 at 16:25:28ID: 24010760
in /config/core.php, set debug level 2 or 3, and post the query that is actually being executed.