AnewtDatabaseConnectionMySQLOld class

MySQL database connection (old MYSQL versions).

Class Overview

MySQL database connection (old MYSQL versions).

This backend uses the older PHP MySQL extension (not MySQLi). Specify mysql-old as the connection type when setting up the connection using AnewtDatabase::setup_connection().

For newer MySQL versions you should use the AnewtDatabaseConnectionMySQL backend instead.

See also

Public Methods

__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.

Parameters

$settings

Associative array with connection settings.

is_connected()

Check whether the connection is currently open.

Return value

True if the connection is open, false otherwise.

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.

Parameters

$options

Backend-specific value.

real_execute_sql($sql)

Execute SQL and create an AnewtDatabaseResultSet for a query.

This method is for internal use only and is backend-specific.

Parameters

$sql

The SQL query to execute.

escape_string($value)

Escape a string for use in SQL queries.

Parameters

$value

The value to escape

Return value

The escaped value

escape_table_name($value)

Escape a table name for use in SQL queries.

Parameters

$value

The value to escape

Return value

The escaped value

escape_column_name($value)

Escape a column name for use in SQL queries.

Parameters

$value

The value to escape

Return value

The escaped value

Protected Methods

real_connect() [protected]

Establish a database connection.

real_disconnect() [protected]

Disconnect the database connection.

Inheritance

Base Classes

Inherited members