Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: db_mysqli.php 4304 2009-01-02 01:11:56Z chris $
| * $Id: db_mysqli.php 4839 2010-03-29 23:52:54Z RyanGordon $
|
*/
class DB_MySQLi
| */
class DB_MySQLi
|
Zeile 185 | Zeile 185 |
---|
foreach($connections[$type] as $single_connection) { $connect_function = "mysqli_connect";
|
foreach($connections[$type] as $single_connection) { $connect_function = "mysqli_connect";
|
if($single_connection['pconnect'])
| $persist = ""; if($single_connection['pconnect'] && version_compare(PHP_VERSION, '5.3.0', '>='))
|
{
|
{
|
$connect_function = "mysqli_pconnect";
| $persist = "p:";
|
} $link = $type."_link";
| } $link = $type."_link";
|
Zeile 198 | Zeile 199 |
---|
list($hostname, $port) = explode(":", $single_connection['hostname'], 2); if($port) {
|
list($hostname, $port) = explode(":", $single_connection['hostname'], 2); if($port) {
|
$this->$link = @$connect_function($hostname, $single_connection['username'], $single_connection['password'], "", $port);
| $this->$link = @$connect_function($persist.$hostname, $single_connection['username'], $single_connection['password'], "", $port);
|
} else {
|
} else {
|
$this->$link = @$connect_function($single_connection['hostname'], $single_connection['username'], $single_connection['password']);
| $this->$link = @$connect_function($persist.$single_connection['hostname'], $single_connection['username'], $single_connection['password']);
|
}
$time_spent = $this->get_execution_time();
| }
$time_spent = $this->get_execution_time();
|
Zeile 261 | Zeile 262 |
---|
$master_success = @mysqli_select_db($this->read_link, $database) or $this->error("[READ] Unable to select database", $this->read_link); if($this->write_link) {
|
$master_success = @mysqli_select_db($this->read_link, $database) or $this->error("[READ] Unable to select database", $this->read_link); if($this->write_link) {
|
$slave_success = @mysqli_select_db($this->write_link, $database) or $this->error("[WRITE] Unable to slave database", $this->write_link);
| $slave_success = @mysqli_select_db($this->write_link, $database) or $this->error("[WRITE] Unable to select slave database", $this->write_link);
|
$success = ($master_success && $slave_success ? true : false); }
| $success = ($master_success && $slave_success ? true : false); }
|