jeudi 13 août 2015

Codeigniter Update using Join

I try to update my table using join in Codeigniter but I get error

Unknown column 'filter.ID_AREA' in 'where clause

$this->db->join('filter', 'filter.ID_AREA = area.ID_AREA', 'left');
$this->db->set('ID_VERIFIKASI', '3');
$this->db->where('pelayanan.ID_AREA', $ID_AREA);
$this->db->where('filter.ID_AREA', $ID_AREA);
$this->db->where('filter.ID_RAYON', $ID_RAYON);
$this->db->where('pelayanan.ID_RAYON = filter.F1_RAYON');
$this->db->where('SUBSTR(TGLRUBAH, 3, 6) = filter.F1_BULANTAHUN');
$this->db->where('ID_VERIFIKASI', '2');
$this->db->where('ID_KENDALA is not null');
$this->db->update('pelayanan');
if ($this->db->affected_rows() > 0) {
        return true;
        } 
        else {
            return false;
        }

How can I update table using join in Codeigniter?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire