Check whether update_batch() is successful in CodeIgniter

前端 未结 2 1204
隐瞒了意图╮
隐瞒了意图╮ 2021-01-19 17:20

I\'m running update_batch() on a table in CodeIgniter and I\'d like to check whether it was successful.

I\'ve tried using affected_rows(), but that only counts the n

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-19 17:40

    Use a simple instruction this will return true or false

    return $this->db->update_batch("sections", $data, "alias");
    

提交回复
热议问题