[eluser]Jan_1[/eluser]
I want to get all lines of the table 'contacts', which are not yet in the table 'customers'.
Code:
SELECT contacts.id,
contacts.etc
FROM contacts
WHERE NOT EXISTS ( SELECT 1
FROM customers
WHERE customers.id_source = contacts.id
AND customers.table_source = contacts.source
)
What is the way to use "where_not_exists()" in active record class, please?
like $this->db->where...
Have tryed without success:
Code:
$sql = "WHERE NOT EXISTS(...)";
$this->db->query($sql);