Skip to content

PHP code snippet – codeigniter How to know update failed?

$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
}
See also  How to write program in Python to get the largest nuber?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.