Vergleich inc/db_mysqli.php - 1.8.10 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 1288Zeile 1288
	 *
* @param string $table The table
* @param array $replacements The replacements

	 *
* @param string $table The table
* @param array $replacements The replacements

 
	 * @param string|array $default_field The default field(s)
* @param boolean $insert_id Whether or not to return an insert id. True by default

	 * @return mysqli_result|bool
*/

	 * @return mysqli_result|bool
*/

	function replace_query($table, $replacements=array())

	function replace_query($table, $replacements=array(), $default_field="", $insert_id=true)

	{
global $mybb;


	{
global $mybb;


Zeile 1332Zeile 1334
	 */
function drop_column($table, $column)
{

	 */
function drop_column($table, $column)
{

		return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} DROP {$column}");



		$column = trim($column, '`');

return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} DROP `{$column}`");

	}

/**
* Adds a column

	}

/**
* Adds a column

	 *

	 *

	 * @param string $table The table
* @param string $column The column name
* @param string $definition the new column definition

	 * @param string $table The table
* @param string $column The column name
* @param string $definition the new column definition

	 * @return mysqli_result
*/

	 * @return mysqli_result
*/

	function add_column($table, $column, $definition)

	function add_column($table, $column, $definition)

	{
return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} ADD {$column} {$definition}");
}




	{
$column = trim($column, '`');

return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} ADD `{$column}` {$definition}");
}


	/**
* Modifies a column
*

	/**
* Modifies a column
*

Zeile 1357Zeile 1363
	 * @return mysqli_result
*/
function modify_column($table, $column, $new_definition)

	 * @return mysqli_result
*/
function modify_column($table, $column, $new_definition)

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



	{
$column = trim($column, '`');

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

	}

/**

	}

/**

Zeile 1372Zeile 1380
	 */
function rename_column($table, $old_column, $new_column, $new_definition)
{

	 */
function rename_column($table, $old_column, $new_column, $new_definition)
{

		return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} CHANGE {$old_column} {$new_column} {$new_definition}");




		$old_column = trim($old_column, '`');
$new_column = trim($new_column, '`');

return $this->write_query("ALTER TABLE {$this->table_prefix}{$table} CHANGE `{$old_column}` `{$new_column}` {$new_definition}");

	}

/**

	}

/**