Welcome Guest, Not a member yet? Register   Sign In
Dual Connection and Database Connectivity Failure
#6

[eluser]WanWizard[/eluser]
So sometimes you have this error, sometimes you don't?

You get this error when this call
Code:
// function db_connect(), in /system/database/drivers/mysql/mysql_driver.php
@mysql_connect($this->hostname, $this->username, $this->password, TRUE);
fails.

It could fail because one of the parameters is wrong (unlikely if it only happens sometimes), or because the server doesn't accept connections (for whatever reason). You could remove the @ in the command, to see the actual error MySQL throws you, or call
Code:
$this->DBr = $this->load->database(‘db_read’, TRUE);
echo $this->DBr->_error_message();
$this->DBw = $this->load->database(‘db_write’, TRUE);
echo $this->DBw->_error_message();


Messages In This Thread
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 04:08 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 04:14 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 04:43 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 04:47 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 04:51 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 10:15 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-23-2010, 10:54 PM
Dual Connection and Database Connectivity Failure - by El Forum - 08-24-2010, 03:08 AM
Dual Connection and Database Connectivity Failure - by El Forum - 08-24-2010, 08:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB