• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ActiveRecord: where not in select ?

#1
[eluser]Piero[/eluser]
Hi,

I have 3 tables, contact, contact_group and group, which allow me contact management by group. The contact_group table has 2 fields, id_contact and id_group, referencing to the primary keys of the 2 other tables.

I want to get the contact entries where the contact.id is NOT in the contact_group table

How can I achieve this with active record...?


Thanks.


Messages In This Thread
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 06:21 AM
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 07:04 AM
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 08:54 AM
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 04:53 PM
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 06:03 PM
ActiveRecord: where not in select ? - by El Forum - 06-24-2011, 06:04 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.