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

#2
[eluser]Piero[/eluser]
So at the end I did it with $this->db->query():

$this->db->query('
SELECT * FROM contact c WHERE NOT EXISTS
(
SELECT id_contact
FROM contact_group cg
WHERE c.id = cg.id_contact
)
');

That returns what I was looking for, but apparently it's not possible to do it with the Active Record methods..


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.