Vergleich inc/db_mysqli.php - 1.6.10 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 430Zeile 430
	 * @param constant The type of array to return.
* @return array The array of results.
*/

	 * @param constant The type of array to return.
* @return array The array of results.
*/

	function fetch_array($query)

	function fetch_array($query, $resulttype=MYSQLI_ASSOC)

	{

	{

		$array = mysqli_fetch_assoc($query);












		switch($resulttype)
{
case MYSQLI_NUM:
case MYSQLI_BOTH:
break;
default:
$resulttype = MYSQLI_ASSOC;
break;
}

$array = mysqli_fetch_array($query, $resulttype);


		return $array;
}


		return $array;
}


Zeile 575Zeile 586
	 * Returns the number of affected rows in a query.
*
* @return int The number of affected rows.

	 * Returns the number of affected rows in a query.
*
* @return int The number of affected rows.

	 */

	 */

	function affected_rows()
{
return mysqli_affected_rows($this->current_link);

	function affected_rows()
{
return mysqli_affected_rows($this->current_link);

Zeile 790Zeile 801
	 * @param string An optional where clause for the query.
* @param string An optional limit clause for the query.
* @param boolean An option to quote incoming values of the array.

	 * @param string An optional where clause for the query.
* @param string An optional limit clause for the query.
* @param boolean An option to quote incoming values of the array.

	 * @return resource The query data.

	 * @return resource The query data.

	 */
function update_query($table, $array, $where="", $limit="", $no_quote=false)
{

	 */
function update_query($table, $array, $where="", $limit="", $no_quote=false)
{

Zeile 812Zeile 823
		{
$query .= $comma."`".$field."`={$quote}{$value}{$quote}";
$comma = ', ';

		{
$query .= $comma."`".$field."`={$quote}{$value}{$quote}";
$comma = ', ';

		}

if(!empty($where))
{
$query .= " WHERE $where";
}

		}

if(!empty($where))
{
$query .= " WHERE $where";
}

		
if(!empty($limit))
{

		
if(!empty($limit))
{

Zeile 844Zeile 855
		if(!empty($where))
{
$query .= " WHERE $where";

		if(!empty($where))
{
$query .= " WHERE $where";

		}

		}

		if(!empty($limit))
{
$query .= " LIMIT $limit";

		if(!empty($limit))
{
$query .= " LIMIT $limit";

Zeile 860Zeile 871
	 */
function escape_string($string)
{

	 */
function escape_string($string)
{

		if(function_exists("mysqli_real_escape_string") && $this->read_link)










		if($this->db_encoding == 'utf8')
{
$string = validate_utf8_string($string, false);
}
elseif($this->db_encoding == 'utf8mb4')
{
$string = validate_utf8_string($string);
}

if(function_exists("mysqli_real_escape_string") && $this->read_link)

		{
$string = mysqli_real_escape_string($this->read_link, $string);

		{
$string = mysqli_real_escape_string($this->read_link, $string);

		}

		}

		else
{
$string = addslashes($string);
}
return $string;

		else
{
$string = addslashes($string);
}
return $string;

	}

	}

	
/**
* Frees the resources of a MySQLi query.

	
/**
* Frees the resources of a MySQLi query.

Zeile 878Zeile 898
	 * @return boolean Returns true on success, false on faliure
*/
function free_result($query)

	 * @return boolean Returns true on success, false on faliure
*/
function free_result($query)

	{

	{

		return mysqli_free_result($query);
}


		return mysqli_free_result($query);
}


Zeile 887Zeile 907
	 *
* @param string The string to be escaped.
* @return string The escaped string.

	 *
* @param string The string to be escaped.
* @return string The escaped string.

	 */

	 */

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

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

Zeile 912Zeile 932
			$this->version = intval($version[0]).".".intval($version[1]).".".intval($version[2]);
}
return $this->version;

			$this->version = intval($version[0]).".".intval($version[1]).".".intval($version[2]);
}
return $this->version;

	}

/**

	}

/**

	 * Optimizes a specific table.
*
* @param string The name of the table to be optimized.

	 * Optimizes a specific table.
*
* @param string The name of the table to be optimized.

Zeile 932Zeile 952
	function analyze_table($table)
{
$this->write_query("ANALYZE TABLE ".$this->table_prefix.$table."");

	function analyze_table($table)
{
$this->write_query("ANALYZE TABLE ".$this->table_prefix.$table."");

	}


	}


	/**
* Show the "create table" command for a specific table.
*

	/**
* Show the "create table" command for a specific table.
*

Zeile 950Zeile 970

/**
* Show the "show fields from" command for a specific table.


/**
* Show the "show fields from" command for a specific table.

	 *
* @param string The name of the table.

	 *
* @param string The name of the table.

	 * @return string Field info for that table
*/
function show_fields_from($table)

	 * @return string Field info for that table
*/
function show_fields_from($table)

Zeile 960Zeile 980
		while($field = $this->fetch_array($query))
{
$field_info[] = $field;

		while($field = $this->fetch_array($query))
{
$field_info[] = $field;

		}

		}

		return $field_info;
}


		return $field_info;
}


Zeile 986Zeile 1006
			}
}
if(preg_match('#FULLTEXT KEY#i', $structure))

			}
}
if(preg_match('#FULLTEXT KEY#i', $structure))

		{
return true;

		{
return true;

		}
return false;
}

		}
return false;
}

Zeile 1005Zeile 1025
		$query = $this->write_query("SHOW TABLE STATUS LIKE '{$this->table_prefix}$table'");
$status = $this->fetch_array($query);
$table_type = my_strtoupper($status['Engine']);

		$query = $this->write_query("SHOW TABLE STATUS LIKE '{$this->table_prefix}$table'");
$status = $this->fetch_array($query);
$table_type = my_strtoupper($status['Engine']);

		if($version >= '3.23.23' && $table_type == 'MYISAM')





		if(version_compare($version, '3.23.23', '>=') && ($table_type == 'MYISAM' || $table_type == 'ARIA'))
{
return true;
}
elseif(version_compare($version, '5.6', '>=') && $table_type == 'INNODB')

		{
return true;
}

		{
return true;
}

Zeile 1022Zeile 1046
	{
$version = $this->get_version();
$supports_fulltext = $this->supports_fulltext($table);

	{
$version = $this->get_version();
$supports_fulltext = $this->supports_fulltext($table);

		if($version >= '4.0.1' && $supports_fulltext == true)

		if(version_compare($version, '4.0.1', '>=') && $supports_fulltext == true)

		{
return true;
}

		{
return true;
}

Zeile 1247Zeile 1271
			'latin5' => 'ISO 8859-9 Turkish',
'armscii8' => 'ARMSCII-8 Armenian',
'utf8' => 'UTF-8 Unicode',

			'latin5' => 'ISO 8859-9 Turkish',
'armscii8' => 'ARMSCII-8 Armenian',
'utf8' => 'UTF-8 Unicode',

 
			'utf8mb4' => '4-Byte UTF-8 Unicode (requires MySQL 5.5.3 or above)',

			'ucs2' => 'UCS-2 Unicode',
'cp866' => 'DOS Russian',
'keybcs2' => 'DOS Kamenicky Czech-Slovak',

			'ucs2' => 'UCS-2 Unicode',
'cp866' => 'DOS Russian',
'keybcs2' => 'DOS Kamenicky Czech-Slovak',

Zeile 1295Zeile 1320
			'latin5' => 'latin5_turkish_ci',
'armscii8' => 'armscii8_general_ci',
'utf8' => 'utf8_general_ci',

			'latin5' => 'latin5_turkish_ci',
'armscii8' => 'armscii8_general_ci',
'utf8' => 'utf8_general_ci',

 
			'utf8mb4' => 'utf8mb4_general_ci',

			'ucs2' => 'ucs2_general_ci',
'cp866' => 'cp866_general_ci',
'keybcs2' => 'keybcs2_general_ci',

			'ucs2' => 'ucs2_general_ci',
'cp866' => 'cp866_general_ci',
'keybcs2' => 'keybcs2_general_ci',