Vergleich inc/db_mysql.php - 1.8.22 - 1.8.38

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

	 * @var resource
*/
public $current_link;

 

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


/**
* The database name.


/**
* The database name.

Zeile 175Zeile 180
			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 191Zeile 199
			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 279Zeile 287
		else
{
$success = $read_success;

		else
{
$success = $read_success;

		}


		}


		if($success && $this->db_encoding)
{
// A little magic to support PHP 5.2.0, 5.2.1 and 5.2.2

		if($success && $this->db_encoding)
{
// A little magic to support PHP 5.2.0, 5.2.1 and 5.2.2

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

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

		}


		}


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

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

Zeile 433Zeile 441
			$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".
"<td style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#".$this->query_count." - Write Query</strong></div></td>\n".

			$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".
"<td style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#".$this->query_count." - Write Query</strong></div></td>\n".

				"</tr>\n".

				"</tr>\n".

				"<tr style=\"background-color: #fefefe;\">\n".
"<td><span style=\"font-family: Courier; font-size: 14px;\">".htmlspecialchars_uni($string)."</span></td>\n".
"</tr>\n".

				"<tr style=\"background-color: #fefefe;\">\n".
"<td><span style=\"font-family: Courier; font-size: 14px;\">".htmlspecialchars_uni($string)."</span></td>\n".
"</tr>\n".

Zeile 446Zeile 454

$this->querylist[$this->query_count]['query'] = $string;
$this->querylist[$this->query_count]['time'] = $qtime;


$this->querylist[$this->query_count]['query'] = $string;
$this->querylist[$this->query_count]['time'] = $qtime;

	}

	}


/**
* Return a result array for a query.


/**
* Return a result array for a query.

Zeile 485Zeile 493
		if($row === false)
{
$array = $this->fetch_array($query);

		if($row === false)
{
$array = $this->fetch_array($query);

			return $array[$field];





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

		}
else
{

		}
else
{

Zeile 1042Zeile 1054
	 */
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 1412Zeile 1424
			$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}");

	}

/**

	}

/**