i have this code
$specific['hostname'] = "localhost";
$specific['username'] = "root";
$specific['password'] = "";
$specific['database'] = "ci_forsyria";
$specific['dbdriver'] = "mysql";
$specific['dbprefix'] = "";
$specific['pconnect'] = FALSE;
$specific['db_debug'] = FALSE;
$specific['cache_on'] = FALSE;
$specific['cachedir'] = "";
$specific['char_set'] = "utf8";
$specific['dbcollat'] = "utf8_general_ci";
$specific_db = $this->load->database($specific, TRUE);
i use this parameter “FALSE” to hide connection error !
$specific['db_debug'] = FALSE;
but how i can create custom error message if connection field
like
$connect = $this->db->connect;
if(!$connect)
{
// print error message ..
}
DB_Debug is designed to show Database error messages.
You have turned that functionality off with “$specific[‘db_debug’] = FALSE;”
So instead you need to turn it back on, and filter the $error message on the error_db.php file.
i.e. inside error_db.php
or something like that