Question : codeigniter how to know update failed
Answered by : average-ape-1wuols5tbd1b
$this->db->trans_start();
$this->db->query('AN SQL QUERY...');
$this->db->update('table',$array);
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE)
{ // generate an error... or use the log_message() function to log your error
}
Source : https://stackoverflow.com/questions/20030642/check-if-db-update-successful-with-codeigniter-when-potentially-no-rows-are-upd | Last Update : Tue, 15 Sep 20