Vergleich inc/db_base.php - 1.8.5 - 1.8.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 14Zeile 14
	 * Connect to the database server.
*
* @param array $config Array of DBMS connection details.

	 * Connect to the database server.
*
* @param array $config Array of DBMS connection details.

	 * @return resource The DB connection resource. Returns false on fail or -1 on a db connect failure.

	 * @return resource|PDOStatement|mysqli_result The DB connection resource. Returns false on fail or -1 on a db connect failure.

	 */
function connect($config);


	 */
function connect($config);


Zeile 22Zeile 22
	 * Query the database.
*
* @param string $string The query SQL.

	 * Query the database.
*
* @param string $string The query SQL.

	 * @param integer $hide_errors 1 if hide errors, 0 if not.

	 * @param integer|bool $hide_errors 1 if hide errors, 0 if not.

	 * @param integer 1 $write_query if executes on master database, 0 if not.

	 * @param integer 1 $write_query if executes on master database, 0 if not.

	 * @return resource The query data.

	 * @return resource|PDOStatement|mysqli_result The query data.

	 */
function query($string, $hide_errors=0, $write_query=0);


	 */
function query($string, $hide_errors=0, $write_query=0);


Zeile 33Zeile 33
	 *
* @param string $query The query SQL.
* @param boolean|int $hide_errors 1 if hide errors, 0 if not.

	 *
* @param string $query The query SQL.
* @param boolean|int $hide_errors 1 if hide errors, 0 if not.

	 * @return resource The query data.

	 * @return resource|PDOStatement|mysqli_result The query data.

	 */
function write_query($query, $hide_errors=0);


	 */
function write_query($query, $hide_errors=0);


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

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

	 * @param resource	   $query	   The query ID.
* @param int $resulttype The type of array to return.

	 * @param resource|PDOStatement|mysqli_result $query The query ID.
* @param int $resulttype The type of array to return. Specified with the different constants for the type using

	 *
* @return array The array of results.
*/

	 *
* @return array The array of results.
*/

Zeile 58Zeile 58
	/**
* Return a specific field from a query.
*

	/**
* Return a specific field from a query.
*

	 * @param resource $query The query ID.

	 * @param resource|PDOStatement|mysqli_result $query The query ID.

	 * @param string $field The name of the field to return.
* @param int|boolean $row The number of the row to fetch it from.
*/

	 * @param string $field The name of the field to return.
* @param int|boolean $row The number of the row to fetch it from.
*/

Zeile 67Zeile 67
	/**
* Moves internal row pointer to the next row
*

	/**
* Moves internal row pointer to the next row
*

	 * @param resource $query The query ID.

	 * @param resource|PDOStatement|mysqli_result $query The query ID.

	 * @param int $row The pointer to move the row to.
*/
function data_seek($query, $row);

	 * @param int $row The pointer to move the row to.
*/
function data_seek($query, $row);

Zeile 75Zeile 75
	/**
* Return the number of rows resulting from a query.
*

	/**
* Return the number of rows resulting from a query.
*

	 * @param resource $query The query ID.

	 * @param resource|PDOStatement|mysqli_result $query The query ID.

	 * @return int The number of rows in the result.
*/
function num_rows($query);

	 * @return int The number of rows in the result.
*/
function num_rows($query);

Zeile 124Zeile 124
	/**
* Return the number of fields.
*

	/**
* Return the number of fields.
*

	 * @param resource $query The query ID.

	 * @param resource|PDOStatement|mysqli_result $query The query ID.

	 * @return int The number of fields.
*/
function num_fields($query);

	 * @return int The number of fields.
*/
function num_fields($query);

Zeile 158Zeile 158
	/**
* Add a shutdown query.
*

	/**
* Add a shutdown query.
*

	 * @param resource $query The query data.
* @param string|int $name An optional name for the query.

	 * @param resource|PDOStatement|mysqli_result $query The query data.
* @param string $name An optional name for the query.

	 */

	 */

	function shutdown_query($query, $name=0);

	function shutdown_query($query, $name='');


/**
* Performs a simple select query.


/**
* Performs a simple select query.

Zeile 170Zeile 170
	 * @param string $fields Comma delimited list of fields to be selected.
* @param string $conditions SQL formatted list of conditions to be matched.
* @param array $options List of options: group by, order by, order direction, limit, limit start.

	 * @param string $fields Comma delimited list of fields to be selected.
* @param string $conditions SQL formatted list of conditions to be matched.
* @param array $options List of options: group by, order by, order direction, limit, limit start.

	 * @return resource The query data.

	 * @return resource|PDOStatement|mysqli_result The query data.

	 */
function simple_select($table, $fields="*", $conditions="", $options=array());


	 */
function simple_select($table, $fields="*", $conditions="", $options=array());


Zeile 188Zeile 188
	 *
* @param string $table The table name to perform the query on.
* @param array $array An array of inserts.

	 *
* @param string $table The table name to perform the query on.
* @param array $array An array of inserts.

	 * @return int The insert ID if available

	 * @return void

	 */
function insert_query_multiple($table, $array);


	 */
function insert_query_multiple($table, $array);


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

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

	 * @return resource The query data.

	 * @return resource|PDOStatement|mysqli_result The query data.

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


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


Zeile 210Zeile 210
	 * @param string $table The table name to perform the query on.
* @param string $where An optional where clause for the query.
* @param string $limit An optional limit clause for the query.

	 * @param string $table The table name to perform the query on.
* @param string $where An optional where clause for the query.
* @param string $limit An optional limit clause for the query.

	 * @return resource The query data.

	 * @return resource|PDOStatement|mysqli_result The query data.

	 */
function delete_query($table, $where="", $limit="");


	 */
function delete_query($table, $where="", $limit="");


Zeile 223Zeile 223
	function escape_string($string);

/**

	function escape_string($string);

/**

	 * Frees the resources of a MySQLi query.

	 * Frees the resources of a query.

	 *

	 *

	 * @param object $query The query to destroy.

	 * @param resource|PDOStatement|mysqli_result $query The query to destroy.

	 * @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);

Zeile 263Zeile 263
	 * Show the "create table" command for a specific table.
*
* @param string $table The name of the table.

	 * Show the "create table" command for a specific table.
*
* @param string $table The name of the table.

	 * @return string The MySQL command to create the specified table.

	 * @return string The SQL command to create the specified table.

	 */
function show_create_table($table);


	 */
function show_create_table($table);


Zeile 271Zeile 271
	 * Show the "show fields from" command for a specific table.
*
* @param string $table The name of the table.

	 * Show the "show fields from" command for a specific table.
*
* @param string $table The name of the table.

	 * @return string Field info for that table

	 * @return array Field info for that table

	 */
function show_fields_from($table);


	 */
function show_fields_from($table);


Zeile 348Zeile 348
	 *
* @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

	 */

	 */

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

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


/**
* Drops a column


/**
* Drops a column

Zeile 405Zeile 407
	/**
* Fetch a list of database character sets this DBMS supports
*

	/**
* Fetch a list of database character sets this DBMS supports
*

	 * @return array Array of supported character sets with array key being the name, array value being display name. False if unsupported

	 * @return array|bool Array of supported character sets with array key being the name, array value being display name. False if unsupported

	 */
function fetch_db_charsets();


	 */
function fetch_db_charsets();


Zeile 413Zeile 415
	 * Fetch a database collation for a particular database character set
*
* @param string $charset The database character set

	 * Fetch a database collation for a particular database character set
*
* @param string $charset The database character set

	 * @return string The matching database collation, false if unsupported

	 * @return string|bool The matching database collation, false if unsupported

	 */
function fetch_charset_collation($charset);


	 */
function fetch_charset_collation($charset);