【发布时间】:2018-09-18 12:23:49
【问题描述】:
早安,
我想使用explode函数更新多行以及代码点火器的位置,但问题是,所有行都更新了。
这是我的控制器:
$ids = explode(',', $this->post('id'));
$this->chatmod->update(array('id'=>$ids),$data);
我的模型:
public function update($ids=null,$data=null)
{
$this->db->where_in($ids);
$this->db->update($this->table, $data);
return true;
}
【问题讨论】:
-
$ids 是一个数组吗?
标签: arrays codeigniter explode where-in