CodeIgniter Forums

Full Version: Get Special DB Connection ERROR
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
PHP Code:
$db_test_account=array(
            
'dsn'    => 'sqlsrv:server='.$post['server_ip'].','.$post['sql_port'].';Database='.$post['sql_account_db_name'],
            
'hostname' => $post['server_ip'].','.$post['sql_port'],
            
'username' => $post['sql_username'],
            
'password' => $post['sql_password'],
            
'database' => $post['sql_account_db_name'],
            
'dbdriver' => 'pdo''dbprefix' => '''pconnect' => FALSE'db_debug' =>false'cache_on' => FALSE'cachedir' => 'application/cache/database''char_set' => '''dbcollat' => '''swap_pre' => '''encrypt' => FALSE'compress' => FALSE'stricton' => FALSE'failover' => array(), 'save_queries' => TRUE
        
);
        
$db_test_account $this->load->database($db_test_account,true);
        if(
$db_test_account->initialize())
        {
            echo 
json_bas('1',dilyaz('basarisiz'),'BAĞLANDI','','DB_CONNECT_TEST','0');
        }
        else
        {
            
/*Here I NEED DB ERROR WHY */
            
            /*Username Passowrd Error or ? server answertime error??? Need get connection Fail Description*/
            
echo json_bas('0',dilyaz('basarisiz'),'BAĞLANMADI','','DB_CONNECT_TEST','0');
        } 


i make here db test connection. if db connection sucess full when > we save db connection info. but when db error we don't get db error message