我正在使用CodeIgniter的update_batch
函数。
我想将一个数组作为第三个参数(where子句)传递给update_batch
。
$data = array(
array(
'title' => 'My title' ,
'name' => 'My Name 2' ,
'date' => 'My date 2'
),
array(
'title' => 'Another title' ,
'name' => 'Another Name 2' ,
'date' => 'Another date 2'
)
);
不要写成这样:
$this->db->update_batch('mytable', $data, 'title');
我想要做这件事情:
$this->db->update_batch('mytable', $data, array('title','name'));
所以要添加多个where条件。
这是否可能?