Public Member Functions | |
getQuoteIdentifierSymbol () | |
listTables () | |
describeTable ($tableName, $schemaName=null) | |
isConnected () | |
closeConnection () | |
prepare ($sql) | |
lastInsertId ($tableName=null, $primaryKey=null) | |
setFetchMode ($mode) | |
limit ($sql, $count, $offset=0) | |
supportsParameters ($type) | |
getServerVersion () | |
Protected Member Functions | |
_quote ($value) | |
_connect () | |
_beginTransaction () | |
_commit () | |
_rollBack () | |
Protected Attributes | |
$_numericDataTypes | |
$_stmt = null | |
$_defaultStmtClass = 'Zend_Db_Statement_Mysqli' |
Definition at line 52 of file Mysqli.php.
_beginTransaction | ( | ) | [protected] |
Begin a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 418 of file Mysqli.php.
_commit | ( | ) | [protected] |
Commit a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 429 of file Mysqli.php.
_connect | ( | ) | [protected] |
Creates a connection to the database.
Zend_Db_Adapter_Mysqli_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 280 of file Mysqli.php.
_quote | ( | $ | value ) | [protected] |
Quote a raw string.
mixed | $value | Raw string |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 104 of file Mysqli.php.
_rollBack | ( | ) | [protected] |
Roll-back a transaction.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 441 of file Mysqli.php.
closeConnection | ( | ) |
Force the connection to close.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 356 of file Mysqli.php.
describeTable | ( | $ | tableName, |
$ | schemaName = null |
||
) |
Returns the column descriptions for a table.
The return value is an associative array keyed by the column name, as returned by the RDBMS.
The value of each array element is an associative array with the following keys:
SCHEMA_NAME => string; name of database or schema TABLE_NAME => string; COLUMN_NAME => string; column name COLUMN_POSITION => number; ordinal position of column in table DATA_TYPE => string; SQL datatype name of column DEFAULT => string; default expression of column, null if none NULLABLE => boolean; true if column can have nulls LENGTH => number; length of CHAR/VARCHAR SCALE => number; scale of NUMERIC/DECIMAL PRECISION => number; precision of NUMERIC/DECIMAL UNSIGNED => boolean; unsigned property of an integer type PRIMARY => boolean; true if column is part of the primary key PRIMARY_POSITION => integer; position of column in primary key IDENTITY => integer; true if column is auto-generated with unique values
string | $tableName | |
string | $schemaName | OPTIONAL |
Use mysqli extension API, because DESCRIBE doesn't work well as a prepared statement on MySQL 4.1.
The optional argument of a MySQL int type is not precision or length; it is only a hint for display width.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 177 of file Mysqli.php.
getQuoteIdentifierSymbol | ( | ) |
Returns the symbol the adapter uses for delimiting identifiers.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 118 of file Mysqli.php.
getServerVersion | ( | ) |
Retrieve server version in PHP style
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 540 of file Mysqli.php.
isConnected | ( | ) |
Test if a connection is active
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 346 of file Mysqli.php.
lastInsertId | ( | $ | tableName = null , |
$ | primaryKey = null |
||
) |
Gets the last ID generated automatically by an IDENTITY/AUTOINCREMENT column.
As a convention, on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2), this method forms the name of a sequence from the arguments and returns the last id generated by that sequence. On RDBMS brands that support IDENTITY/AUTOINCREMENT columns, this method returns the last value generated for such a column, and the table name argument is disregarded.
MySQL does not support sequences, so $tableName and $primaryKey are ignored.
string | $tableName | OPTIONAL Name of table. |
string | $primaryKey | OPTIONAL Name of primary key column. |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 407 of file Mysqli.php.
limit | ( | $ | sql, |
$ | count, | ||
$ | offset = 0 |
||
) |
Adds an adapter-specific LIMIT clause to the SELECT statement.
string | $sql | |
int | $count | |
int | $offset | OPTIONAL |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 490 of file Mysqli.php.
listTables | ( | ) |
Returns a list of the tables in the database.
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 128 of file Mysqli.php.
prepare | ( | $ | sql ) |
Prepare a statement and return a PDOStatement-like object.
string | $sql | SQL query |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 370 of file Mysqli.php.
setFetchMode | ( | $ | mode ) |
Set the fetch mode.
int | $mode |
Zend_Db_Adapter_Mysqli_Exception |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 455 of file Mysqli.php.
supportsParameters | ( | $ | type ) |
Check if the adapter supports real SQL parameters.
string | $type | 'positional' or 'named' |
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 524 of file Mysqli.php.
$_numericDataTypes [protected] |
array( Zend_Db::INT_TYPE => Zend_Db::INT_TYPE, Zend_Db::BIGINT_TYPE => Zend_Db::BIGINT_TYPE, Zend_Db::FLOAT_TYPE => Zend_Db::FLOAT_TYPE, 'INT' => Zend_Db::INT_TYPE, 'INTEGER' => Zend_Db::INT_TYPE, 'MEDIUMINT' => Zend_Db::INT_TYPE, 'SMALLINT' => Zend_Db::INT_TYPE, 'TINYINT' => Zend_Db::INT_TYPE, 'BIGINT' => Zend_Db::BIGINT_TYPE, 'SERIAL' => Zend_Db::BIGINT_TYPE, 'DEC' => Zend_Db::FLOAT_TYPE, 'DECIMAL' => Zend_Db::FLOAT_TYPE, 'DOUBLE' => Zend_Db::FLOAT_TYPE, 'DOUBLE PRECISION' => Zend_Db::FLOAT_TYPE, 'FIXED' => Zend_Db::FLOAT_TYPE, 'FLOAT' => Zend_Db::FLOAT_TYPE )
Reimplemented from Zend_Db_Adapter_Abstract.
Definition at line 66 of file Mysqli.php.