📜  codeigniter 如何知道更新失败 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:36.149000             🧑  作者: Mango

代码示例1
$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
}