does anybody know if there is a cake function for the WHERE NOT EXISTS
functionality?

i have "users" who have many "roles" in the join table "role_users" -
and i want to display the ones not having any roles yet

id user_id role_id
1  2  3
2  3  3
etc
(user 1 not in the list yet, so does not have any role)

with mysql itself if would say:
select * from users left join role_users where not exists (select *
from role_users where user_id = 3)
for example

i could do some complex reversing - but was looking for some more
convinient way to do it :)

thx, mark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to