usa IN
cláusula como
$this->db->where('a.PreferenceID NOT IN (
SELECT PreferenceParentID FROM '.$table.'
WHERE EntityID IN ('.implode(",", $array).'))',
NULL, FALSE
);
usa IN
cláusula como
$this->db->where('a.PreferenceID NOT IN (
SELECT PreferenceParentID FROM '.$table.'
WHERE EntityID IN ('.implode(",", $array).'))',
NULL, FALSE
);