| [ Index ] | PHP Cross Reference of MyBB 1.8.39 | 
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 1665 lines (38 kb) | 
| Included or required: | 0 times | 
| Referenced: | 0 times | 
| Includes or requires: | 1 file inc/class_error.php | 
DB_MySQL:: (55 methods):
  connect()
  select_db()
  query()
  write_query()
  explain_query()
  fetch_array()
  fetch_field()
  data_seek()
  num_rows()
  insert_id()
  close()
  error_number()
  error_string()
  error()
  affected_rows()
  num_fields()
  list_tables()
  table_exists()
  field_exists()
  shutdown_query()
  simple_select()
  insert_query()
  insert_query_multiple()
  update_query()
  quote_val()
  delete_query()
  escape_string()
  free_result()
  escape_string_like()
  get_version()
  optimize_table()
  analyze_table()
  show_create_table()
  show_fields_from()
  is_fulltext()
  supports_fulltext()
  index_exists()
  supports_fulltext_boolean()
  create_fulltext_index()
  drop_index()
  drop_table()
  rename_table()
  replace_query()
  drop_column()
  add_column()
  modify_column()
  rename_column()
  set_table_prefix()
  fetch_size()
  fetch_db_charsets()
  fetch_charset_collation()
  build_create_table_collation()
  get_execution_time()
  escape_binary()
  unescape_binary()
| connect($config) X-Ref | 
| 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. | 
| select_db($database) X-Ref | 
| Selects the database to use. param: string $database The database name. return: boolean True when successfully connected, false if not. | 
| query($string, $hide_errors=0, $write_query=0) X-Ref | 
| Query the database. param: string $string The query SQL. param: integer $hide_errors 1 if hide errors, 0 if not. param: integer $write_query 1 if executes on master database, 0 if not. return: resource The query data. | 
| write_query($query, $hide_errors=0) X-Ref | 
| Execute a write query on the master database param: string $query The query SQL. param: boolean|int $hide_errors 1 if hide errors, 0 if not. return: resource The query data. | 
| explain_query($string, $qtime) X-Ref | 
| Explain a query on the database. param: string $string The query SQL. param: string $qtime The time it took to perform the query. | 
| fetch_array($query, $resulttype=MYSQL_ASSOC) X-Ref | 
| Return a result array for a query. param: resource $query The query ID. param: int $resulttype The type of array to return. Either MYSQL_NUM, MYSQL_BOTH or MYSQL_ASSOC return: array The array of results. | 
| fetch_field($query, $field, $row=false) X-Ref | 
| Return a specific field from a query. param: resource $query The query ID. param: string $field The name of the field to return. param: int|bool $row The number of the row to fetch it from. return: mixed | 
| data_seek($query, $row) X-Ref | 
| Moves internal row pointer to the next row param: resource $query The query ID. param: int $row The pointer to move the row to. return: bool | 
| num_rows($query) X-Ref | 
| Return the number of rows resulting from a query. param: resource $query The query ID. return: int The number of rows in the result. | 
| insert_id() X-Ref | 
| Return the last id number of inserted data. return: int The id number. | 
| close() X-Ref | 
| Close the connection with the DBMS. | 
| error_number() X-Ref | 
| Return an error number. return: int The error number of the current error. | 
| error_string() X-Ref | 
| Return an error string. return: string The explanation for the current error. | 
| error($string="") X-Ref | 
| Output a database error. param: string $string The string to present as an error. return: bool Returns false if error reporting is disabled, otherwise true | 
| affected_rows() X-Ref | 
| Returns the number of affected rows in a query. return: int The number of affected rows. | 
| num_fields($query) X-Ref | 
| Return the number of fields. param: resource $query The query ID. return: int The number of fields. | 
| list_tables($database, $prefix='') X-Ref | 
| Lists all tables in the database. param: string $database The database name. param: string $prefix Prefix of the table (optional) return: array The table list. | 
| table_exists($table) X-Ref | 
| Check if a table exists in a database. param: string $table The table name. return: boolean True when exists, false if not. | 
| field_exists($field, $table) X-Ref | 
| Check if a field exists in a database. param: string $field The field name. param: string $table The table name. return: boolean True when exists, false if not. | 
| shutdown_query($query, $name="") X-Ref | 
| Add a shutdown query. param: resource $query The query data. param: string $name An optional name for the query. | 
| simple_select($table, $fields="*", $conditions="", $options=array() X-Ref | 
| Performs a simple select query. param: string $table The table name to be queried. param: string $fields Comma delimetered 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. | 
| insert_query($table, $array) X-Ref | 
| Build an insert query from an array. param: string $table The table name to perform the query on. param: array $array An array of fields and their values. return: int The insert ID if available | 
| insert_query_multiple($table, $array) X-Ref | 
| Build one query for multiple inserts from a multidimensional array. param: string $table The table name to perform the query on. param: array $array An array of inserts. return: void | 
| update_query($table, $array, $where="", $limit="", $no_quote=false) X-Ref | 
| Build an update query from an array. param: string $table The table name to perform the query on. param: array $array An array of fields and their values. 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. | 
| quote_val($value, $quote="'") X-Ref | 
| param: int|string $value param: string $quote return: int|string | 
| delete_query($table, $where="", $limit="") X-Ref | 
| Build a delete 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. | 
| escape_string($string) X-Ref | 
| Escape a string according to the MySQL escape format. param: string $string The string to be escaped. return: string The escaped string. | 
| free_result($query) X-Ref | 
| Frees the resources of a MySQLi query. param: resource $query The query to destroy. return: boolean Returns true on success, false on faliure | 
| escape_string_like($string) X-Ref | 
| Escape a string used within a like command. param: string $string The string to be escaped. return: string The escaped string. | 
| get_version() X-Ref | 
| Gets the current version of MySQL. return: string Version of MySQL. | 
| optimize_table($table) X-Ref | 
| Optimizes a specific table. param: string $table The name of the table to be optimized. | 
| analyze_table($table) X-Ref | 
| Analyzes a specific table. param: string $table The name of the table to be analyzed. | 
| show_create_table($table) X-Ref | 
| 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. | 
| show_fields_from($table) X-Ref | 
| Show the "show fields from" command for a specific table. param: string $table The name of the table. return: array Field info for that table | 
| is_fulltext($table, $index="") X-Ref | 
| Returns whether or not the table contains a fulltext index. param: string $table The name of the table. param: string $index Optionally specify the name of the index. return: boolean True or false if the table has a fulltext index or not. | 
| supports_fulltext($table) X-Ref | 
| Returns whether or not this database engine supports fulltext indexing. param: string $table The table to be checked. return: boolean True or false if supported or not. | 
| index_exists($table, $index) X-Ref | 
| Checks to see if an index exists on a specified table param: string $table The name of the table. param: string $index The name of the index. return: bool Whether or not the index exists in that table | 
| supports_fulltext_boolean($table) X-Ref | 
| Returns whether or not this database engine supports boolean fulltext matching. param: string $table The table to be checked. return: boolean True or false if supported or not. | 
| create_fulltext_index($table, $column, $name="") X-Ref | 
| Creates a fulltext index on the specified column in the specified table with optional index name. param: string $table The name of the table. param: string $column Name of the column to be indexed. param: string $name The index name, optional. | 
| drop_index($table, $name) X-Ref | 
| Drop an index with the specified name from the specified table param: string $table The name of the table. param: string $name The name of the index. | 
| drop_table($table, $hard=false, $table_prefix=true) X-Ref | 
| Drop an table with the specified table param: string $table The table to drop param: boolean $hard hard drop - no checking param: boolean $table_prefix use table prefix | 
| rename_table($old_table, $new_table, $table_prefix=true) X-Ref | 
| Renames a table param: string $old_table The old table name param: string $new_table the new table name param: boolean $table_prefix use table prefix return: resource | 
| replace_query($table, $replacements=array() X-Ref | 
| Replace contents of table with values 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: resource|bool | 
| drop_column($table, $column) X-Ref | 
| Drops a column param: string $table The table param: string $column The column name return: resource | 
| add_column($table, $column, $definition) X-Ref | 
| Adds a column param: string $table The table param: string $column The column name param: string $definition the new column definition return: resource | 
| modify_column($table, $column, $new_definition, $new_not_null=false, $new_default_value=false) X-Ref | 
| Modifies a column param: string $table The table param: string $column The column name param: string $new_definition the new column definition param: boolean|string $new_not_null Whether to "drop" or "set" the NOT NULL attribute (no change if false) param: boolean|string $new_default_value The new default value, or false to drop the attribute return: bool Returns true if all queries are executed successfully or false if one of them failed | 
| rename_column($table, $old_column, $new_column, $new_definition, $new_not_null=false, $new_default_value=false) X-Ref | 
| Renames a column param: string $table The table param: string $old_column The old column name param: string $new_column the new column name param: string $new_definition the new column definition param: boolean|string $new_not_null Whether to "drop" or "set" the NOT NULL attribute (no change if false) param: boolean|string $new_default_value The new default value, or false to drop the attribute return: bool Returns true if all queries are executed successfully | 
| set_table_prefix($prefix) X-Ref | 
| Sets the table prefix used by the simple select, insert, update and delete functions param: string $prefix The new table prefix | 
| fetch_size($table='') X-Ref | 
| Fetched the total size of all mysql tables or a specific table param: string $table The table (optional) return: integer the total size of all mysql tables or a specific table | 
| fetch_db_charsets() X-Ref | 
| Fetch a list of database character sets this DBMS supports return: array|bool Array of supported character sets with array key being the name, array value being display name. False if unsupported | 
| fetch_charset_collation($charset) X-Ref | 
| Fetch a database collation for a particular database character set param: string $charset The database character set return: string|bool The matching database collation, false if unsupported | 
| build_create_table_collation() X-Ref | 
| Fetch a character set/collation string for use with CREATE TABLE statements. Uses current DB encoding return: string The built string, empty if unsupported | 
| get_execution_time() X-Ref | 
| Time how long it takes for a particular piece of code to run. Place calls above & below the block of code. | 
| escape_binary($string) X-Ref | 
| Binary database fields require special attention. param: string $string Binary value return: string Encoded binary value | 
| unescape_binary($string) X-Ref | 
| Unescape binary data. param: string $string Binary value return: string Encoded binary value | 
| 2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |