我在笨运行update_batch()在桌子上,我想检查它是否成功。
我已经使用affected_rows()试过了,但仅计算已被修改,所以它并不完全切断它的表单字段数量:
$this->db->update_batch("sections", $data, "alias");
log_message("debug", "items in form: ".count($data));
// items in form: 3
log_message("debug", "rows updated: ".$this->db->affected_rows());
// rows updated: 0-3
// depending on whether anything was actually changed on the form
return ($this->db->affected_rows() == count($data)); // unreliable
这似乎是一个相当简单的事情从一个批处理更新功能要求。 是不是有什么我已经错过了,或者我应该只写我自己的批量更新的代码?