Public Member Functions | |
| __construct ($settings) | |
| Create a new connection instance (internal use only). | |
| is_connected () | |
| Check whether the connection is currently open. | |
| last_insert_id ($options=null) | |
| Get the last insert id for this connection. | |
| real_execute_sql ($sql) | |
| Execute SQL and create an AnewtDatabaseResultSet for a query. | |
| escape_string ($value) | |
| Escape a string for use in SQL queries. | |
| escape_table_name ($value) | |
| Escape a table name for use in SQL queries. | |
| escape_column_name ($value) | |
| Escape a column name for use in SQL queries. | |
Protected Member Functions | |
| real_connect () | |
| Establish a database connection. | |
| real_disconnect () | |
| Disconnect the database connection. | |
This backend uses the PHP MySQLi extension. Specify mysql as the connection type when setting up the connection using AnewtDatabase::setup_connection().
Older MySQL versions are supported using the old MySQL backend. See AnewtDatabaseConnectionMySQLOld for more information.
The settings accepted by this backend are:
hostname The hostnameusername The usernamepassword The passworddatabase The name of the databaseencoding The character encoding (optional, defaults to UTF8)
Definition at line 32 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::__construct | ( | $ | settings | ) |
Create a new connection instance (internal use only).
Do not call this method directly; it is for internal use only. See the AnewtDatabase documentation on how to setup and obtain AnewtDatabaseConnection instances.
| $settings | Associative array with connection settings. |
Reimplemented from AnewtDatabaseConnection.
Definition at line 34 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::is_connected | ( | ) |
Check whether the connection is currently open.
True if the connection is open, false otherwise. Reimplemented from AnewtDatabaseConnection.
Definition at line 107 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::last_insert_id | ( | $ | options = null |
) |
Get the last insert id for this connection.
The $options parameter is database backend specific. For most backends this value is not needed. At least PostgreSQL needs a sequence name. See the backend documentation for more information.
| $options | Backend-specific value. |
Reimplemented from AnewtDatabaseConnection.
Definition at line 112 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::real_execute_sql | ( | $ | sql | ) |
Execute SQL and create an AnewtDatabaseResultSet for a query.
This method is for internal use only and is backend-specific.
| $sql | The SQL query to execute. |
Reimplemented from AnewtDatabaseConnection.
Definition at line 117 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::escape_string | ( | $ | value | ) |
Escape a string for use in SQL queries.
| $value | The value to escape |
Reimplemented from AnewtDatabaseConnection.
Definition at line 132 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::escape_table_name | ( | $ | value | ) |
Escape a table name for use in SQL queries.
| $value | The value to escape |
Reimplemented from AnewtDatabaseConnection.
Definition at line 139 of file backend-mysql.lib.php.
| AnewtDatabaseConnectionMySQL::escape_column_name | ( | $ | value | ) |
Escape a column name for use in SQL queries.
| $value | The value to escape |
Reimplemented from AnewtDatabaseConnection.
Definition at line 162 of file backend-mysql.lib.php.
1.5.9