Vergleich inc/db_mysql.php - 1.2.5 - 1.2.8

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: db_mysql.php 2743 2007-02-09 00:05:26Z CraKteR $

 * $Id: db_mysql.php 3030 2007-04-26 00:19:47Z Tikitiki $

 */

class databaseEngine

 */

class databaseEngine

Zeile 91Zeile 91
		}
else
{

		}
else
{

			$this->link = @mysql_connect($hostname, $username, $password, $newlink) or $this->dberror();








			if(phpversion() < '4.2.0')
{
$this->link = @mysql_connect($hostname, $username, $password) or $this->dberror();
}
else
{
$this->link = @mysql_connect($hostname, $username, $password, $newlink) or $this->dberror();
}

		}
return $this->link;
}

/**
* Selects the database to use.

		}
return $this->link;
}

/**
* Selects the database to use.

	 *

	 *

	 * @param string The database name.
* @return boolean True when successfully connected, false if not.
*/

	 * @param string The database name.
* @return boolean True when successfully connected, false if not.
*/

Zeile 123Zeile 130
		{
$this->dberror($string);
exit;

		{
$this->dberror($string);
exit;

		}

		}

		$qtime = $qtimer->stop();
$querytime += $qtimer->totaltime;
$qtimer->remove();

		$qtime = $qtimer->stop();
$querytime += $qtimer->totaltime;
$qtimer->remove();

Zeile 143Zeile 150
	 */
function explain_query($string, $qtime)
{

	 */
function explain_query($string, $qtime)
{

 
		global $plugins;
if($plugins->current_hook)
{
$debug_extra = "<div style=\"float_right\">(Plugin Hook: {$plugins->current_hook})</div>";
}

		if(preg_match("#^\s*select#i", $string))
{
$query = mysql_query("EXPLAIN $string", $this->link);
$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".

		if(preg_match("#^\s*select#i", $string))
{
$query = mysql_query("EXPLAIN $string", $this->link);
$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".

				"<td colspan=\"8\" style=\"background-color: #ccc;\"><strong>#".$this->query_count." - Select Query</strong></td>\n".

				"<td colspan=\"8\" style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#".$this->query_count." - Select Query</strong></div></td>\n".

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

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

Zeile 189Zeile 201
		{
$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".

		{
$this->explain .= "<table style=\"background-color: #666;\" width=\"95%\" cellpadding=\"4\" cellspacing=\"1\" align=\"center\">\n".
"<tr>\n".

				"<td style=\"background-color: #ccc;\"><strong>#".$this->query_count." - Write Query</strong></td>\n".

				"<td style=\"background-color: #ccc;\">{$debug_extra}<div><strong>#".$this->query_count." - Write Query</strong></div></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".
"<tr style=\"background-color: #fefefe;\">\n".
"<td><span style=\"font-family: Courier; font-size: 14px;\">".htmlspecialchars_uni($string)."</span></td>\n".