[ Index ]

PHP Cross Reference of MyBB 1.8.37

title

Body

[close]

/inc/ -> AbstractPdoDbDriver.php (summary)

MyBB 1.8 Copyright 2020 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 719 lines (18 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 1 file
 inc/class_error.php

Defines 24 functions

  connect()
  parseHostname()
  setCharacterSet()
  execIgnoreError()
  error()
  error_number()
  error_string()
  query()
  write_query()
  fetch_array()
  fetch_field()
  data_seek()
  num_rows()
  insert_id()
  close()
  affected_rows()
  num_fields()
  shutdown_query()
  escape_string()
  free_result()
  escape_string_like()
  get_version()
  set_table_prefix()
  get_execution_time()

Functions
Functions that are not part of a class:

connect($config)   X-Ref
Connect to the database server.
return: bool Whether opening the connection was successful.
param: array $config Array of DBMS connection details.

parseHostname($hostname)   X-Ref
Parse a hostname and possible port combination.
return: array Array of host and port.
param: string $hostname The hostname string. Can be any of the following formats:

setCharacterSet($characterSet)   X-Ref
Set the character set to use. This issues a `SET NAMES` query to both the read and write links.
return: void
param: string $characterSet The character set to use.

execIgnoreError($connection, $query)   X-Ref
Execute a query, ignoring any errors.
param: PDO $connection The connection to execute the query on.
param: string $query The query to execute.

error($string = '')   X-Ref
Output a database error.
return: bool Whether error reporting is enabled or not
param: string $string The string to present as an error.

error_number()   X-Ref
Return the error code for the last error that occurred.
return: string|null The error code for the last error that occurred, or null if no error occurred.

error_string()   X-Ref
Return athe error message for the last error that occurred.
return: string|null The error message for the last error that occurred, or null if no error occurred.

query($string, $hideErrors = false, $writeQuery = false)   X-Ref
Query the database.
return: PDOStatement|null The result of the query, or null if an error occurred and {@see $hideErrors} was set.
param: string $string The query SQL.
param: boolean|int $hideErrors Whether to hide any errors that occur.
param: boolean|int $writeQuery Whether to run the query on the write connection rather than the read connection.

write_query($query, $hideErrors = false)   X-Ref
Execute a write query on the master database
return: PDOStatement|null The result of the query, or null if an error occurred and {@see $hideErrors} was set.
param: string $query The query SQL.
param: boolean|int $hideErrors Whether to hide any errors that occur.

fetch_array($query, $resultType = PDO::FETCH_ASSOC)   X-Ref
Return a result array for a query.
return: array|bool The array of results, or false if there are no more results.
param: PDOStatement $query The query to retrieve a result for.
param: int $resultType The type of array to return. Can be any of the following values:

fetch_field($query, $field, $row = false)   X-Ref
Return a specific field from a query.
return: mixed The resulting field, of false if no more rows are in th result set.
param: PDOStatement $query The query to retrieve a result for.
param: string $field The name of the field to return.
param: int|bool $row The number of the row to fetch it from, or false to fetch from the next row in the result set.

data_seek($query, $row)   X-Ref
Move the internal row pointer to the specified row.
return: bool Whether seeking was successful.
param: PDOStatement $query The query to move the row pointer for.
param: int $row The row to move to. Rows are numbered from 0.

num_rows($query)   X-Ref
Return the number of rows resulting from a query.
return: int|bool The number of rows in the result, or false on failure.
param: PDOStatement $query The query data.

insert_id()   X-Ref
Return the last id number of inserted data.
return: string The id number.

close()   X-Ref
Close the connection with the DBMS.

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.
return: int|bool The number of fields, or false if the number of fields could not be retrieved.
param: PDOStatement $query The query result to get the number of fields for.

shutdown_query($query, $name = '')   X-Ref
No description

escape_string($string)   X-Ref
No description

free_result($query)   X-Ref
No description

escape_string_like($string)   X-Ref
No description

get_version()   X-Ref
No description

set_table_prefix($prefix)   X-Ref
No description

get_execution_time()   X-Ref
No description



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref