【发布时间】:2015-11-05 19:45:18
【问题描述】:
我尝试在 Codeigniter 中使用 join 更新我的表,但出现错误
'where 子句中的未知列'filter.ID_AREA'
$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;
}
如何在 Codeigniter 中使用 join 更新表?
【问题讨论】:
-
显示你的数据库表结构
标签: mysql codeigniter join