Codeigniter 2.2 - Active Record update with left join and multiple where clauses Codeigniter 2.2 - Active Record update with left join and multiple where clauses codeigniter codeigniter

Codeigniter 2.2 - Active Record update with left join and multiple where clauses


This'll help you. Try this.

Note: you need to place your values over ? else it'll throw an error 1064

$this->db->set('ml.assigned_to', 'null');$this->db->where('ml.assigned_to = ?');$this->db->where('((dl.disposition_id != 6 AND dl.disposition_id != 3) OR (dl.disposition_id IS NULL))');$this->db->where('ml.decline = 0');$this->db->where('ml.subcategory_id = ?');$this->db->update('msh_leads ml join msh_leads_disposition_log dl on ml.id = dl.lead_id');