Would would need to do a not in condition. The below find method should produce something to the following
SELECT * FROM users as user where user.group_id <> yourid;
On Wed, Dec 19, 2012 at 11:21 AM, byqsri <marco.rizzetto@gmail.com> wrote:
HiI'm newbie with cakephpI have model User, model Group and model UsersGroup ( an user can belongs to many groups and a group can have many users).I would ask how in CakePHP can I find all users that not belong to the Group group_id (where group_id is a generic int value)Many thanks--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
No comments:
Post a Comment