Class for connecting to SQL databases and performing common operations.
Located in /Zend/Db/Adapter/Abstract.php (line 40)
Class | Description |
---|---|
![]() |
|
![]() |
Class for connecting to SQL databases and performing common operations. |
![]() |
|
![]() |
Class for connecting to SQL databases and performing common operations using PDO. |
User-provided configuration
Database connection
Fetch mode
Query profiler
Constructor.
$config is an array of key/value pairs containing configuration options. These options are common to most adapters:
dbname => (string) The name of the database to user (required) username => (string) Connect to the database as this username (optional). password => (string) Password associated with the username (optional). host => (string) What host to connect to (default 127.0.0.1).
Leave autocommit mode and begin a transaction.
Force the connection to close.
Commit a transaction and return to autocommit mode.
Deletes table rows based on a WHERE clause.
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
Fetches all SQL result rows as a sequential array.
Uses the current fetchMode for the adapter.
Fetches all SQL result rows as an associative array.
The first column is the key, the entire row array is the value.
Fetches the first column of all SQL result rows as an array.
The first column in each row is used as the array key.
Fetches the first column of the first row of the SQL result.
Fetches all SQL result rows as an array of key-value pairs.
The first column is the key, the second column is the value.
Fetches the first row of the SQL result.
Uses the current fetchMode for the adapter.
Returns the underlying database connection object or resource.
If not presently connected, this initiates the connection.
Get the fetch mode.
Returns the symbol the adapter uses for delimited identifiers.
Inserts a table row with specified data.
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.
Return the most recent value from the specified sequence in the database.
This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null.
Adds an adapter-specific LIMIT clause to the SELECT statement.
Returns a list of the tables in the database.
Generate a new value from the specified sequence in the database, and return it.
This is supported only on RDBMS brands that support sequences (e.g. Oracle, PostgreSQL, DB2). Other RDBMS brands return null.
Prepare a statement and return a PDOStatement-like object.
Prepares and executes an SQL statement with bound data.
Safely quotes a value for an SQL statement.
If an array is passed as the value, the array values are quoted and then returned as a comma-separated string.
Quote a column identifier and alias.
Quotes an identifier.
Accepts a string representing a qualified indentifier. For Example:
Or, an array of one or more identifiers that may form a qualified identifier:
The actual quote character surrounding the identifiers may vary depending on the adapter.
Quotes a value and places into a piece of text at a placeholder.
The placeholder is a question-mark; all placeholders will be replaced with the quoted value. For example:
Quote a table identifier and alias.
Roll back a transaction and return to autocommit mode.
Creates and returns a new Zend_Db_Select object for this adapter.
Set the fetch mode.
Updates table rows with specified data based on a WHERE clause.
Begin a transaction.
Commit a transaction.
Creates a connection to the database.
Quote a raw string.
Quote an identifier.
Quote an identifier and an optional alias.
Roll-back a transaction.
Documentation generated on Fri, 06 Apr 2007 18:14:45 -0700 by phpDocumentor 1.3.1