If you wan to check codeigniter query errors instead of showing them to the user then follow in below
First: Open application/config/database.php
Set this code
<?php
// suppress error output to the screen
$db[’default’][’db_debug’] = FALSE;
?>
Paste this code in your controller:
<?php
// try the select.
$dbRet = $this->db->select($table, $dataArray);
// select has had some problem.
if( !$dbRet )
{
$errNo = $this->db->_error_number()
$errMess = $this->db->_error_message();
// Do something with the error message or just show_404();
}
?>
Question and answer is powered by AnsPress.io