Vergleich inc/db_mysqli.php - 1.8.22 - 1.8.34

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 72Zeile 72
	 * @var mysqli
*/
public $current_link;

	 * @var mysqli
*/
public $current_link;

 

/**
* @var array
*/
public $connections = array();


/**
* The database name.


/**
* The database name.

Zeile 174Zeile 179
			else
{
$connections = $config;

			else
{
$connections = $config;

			}
}

$this->db_encoding = $config['encoding'];




			}
}

if(isset($config['encoding']))
{
$this->db_encoding = $config['encoding'];
}


// Actually connect to the specified servers
foreach(array('read', 'write') as $type)


// Actually connect to the specified servers
foreach(array('read', 'write') as $type)

Zeile 190Zeile 198
			if(array_key_exists('hostname', $connections[$type]))
{
$details = $connections[$type];

			if(array_key_exists('hostname', $connections[$type]))
{
$details = $connections[$type];

				unset($connections);

				unset($connections[$type]);

				$connections[$type][] = $details;
}


				$connections[$type][] = $details;
}


Zeile 210Zeile 218
				$link = "{$type}_link";

get_execution_time();

				$link = "{$type}_link";

get_execution_time();





				// Specified a custom port for this connection?
$port = 0;
if(strstr($single_connection['hostname'],':'))
{
list($hostname, $port) = explode(":", $single_connection['hostname'], 2);

				// Specified a custom port for this connection?
$port = 0;
if(strstr($single_connection['hostname'],':'))
{
list($hostname, $port) = explode(":", $single_connection['hostname'], 2);

				}


				}


				if($port)
{
$this->$link = @$connect_function($persist.$hostname, $single_connection['username'], $single_connection['password'], "", $port);

				if($port)
{
$this->$link = @$connect_function($persist.$hostname, $single_connection['username'], $single_connection['password'], "", $port);

Zeile 228Zeile 236
				}

$time_spent = get_execution_time();

				}

$time_spent = get_execution_time();

				$this->query_time += $time_spent;


				$this->query_time += $time_spent;


				// Successful connection? break down brother!
if($this->$link)
{

				// Successful connection? break down brother!
if($this->$link)
{

Zeile 330Zeile 338
		{
$this->current_link = &$this->read_link;
$query = @mysqli_query($this->read_link, $string);

		{
$this->current_link = &$this->read_link;
$query = @mysqli_query($this->read_link, $string);

		}


		}


		if($this->error_number() && !$hide_errors)
{
$this->error($string);

		if($this->error_number() && !$hide_errors)
{
$this->error($string);

Zeile 356Zeile 364
			$this->explain_query($string, $query_time);
}
return $query;

			$this->explain_query($string, $query_time);
}
return $query;

	}


	}


	/**
* Execute a write query on the master database
*

	/**
* Execute a write query on the master database
*

Zeile 382Zeile 390

$debug_extra = '';
if($plugins->current_hook)


$debug_extra = '';
if($plugins->current_hook)

		{

		{

			$debug_extra = "<div style=\"float_right\">(Plugin Hook: {$plugins->current_hook})</div>";
}
if(preg_match("#^\s*select#i", $string))

			$debug_extra = "<div style=\"float_right\">(Plugin Hook: {$plugins->current_hook})</div>";
}
if(preg_match("#^\s*select#i", $string))

Zeile 485Zeile 493
			$this->data_seek($query, $row);
}
$array = $this->fetch_array($query);

			$this->data_seek($query, $row);
}
$array = $this->fetch_array($query);

		return $array[$field];





		if($array !== null)
{
return $array[$field];
}
return null;

	}

/**

	}

/**

Zeile 1035Zeile 1047
	 */
function escape_string_like($string)
{

	 */
function escape_string_like($string)
{

		return $this->escape_string(str_replace(array('%', '_') , array('\\%' , '\\_') , $string));

		return $this->escape_string(str_replace(array('\\', '%', '_') , array('\\\\', '\\%' , '\\_') , $string));

	}

/**

	}

/**

Zeile 1384Zeile 1396
			$not_null = '';
}


			$not_null = '';
}


		if($new_default_value !== null)

		if($new_default_value !== false)

		{
$default = "DEFAULT ".$new_default_value;
}

		{
$default = "DEFAULT ".$new_default_value;
}

Zeile 1393Zeile 1405
			$default = '';
}


			$default = '';
}


		return (bool)$this->write_query("ALTER TABLE {$this->table_prefix}{$table} MODIFY `{$column}` {$new_definition} {$not_null}");

		return (bool)$this->write_query("ALTER TABLE {$this->table_prefix}{$table} MODIFY `{$column}` {$new_definition} {$not_null} {$default}");

	}

/**

	}

/**