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 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.
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
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 inserted ID.
Adds an adapter-specific LIMIT clause to the SELECT statement.
Returns a list of the tables in the database.
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.
Quotes an identifier.
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:
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.
Roll-back a transaction.
Documentation generated on Wed, 21 Feb 2007 11:45:21 -0800 by phpDocumentor 1.3.1