Метод |
Описание |
|
adapterName ( ) : string |
Returns the human-readable name of the adapter. Use mixed case - one
can always use downcase if needed. |
|
beginDbTransaction ( ) |
Begins the transaction (and turns off auto-committing). |
|
commitDbTransaction ( ) |
Commits the transaction (and turns on auto-committing). |
|
connect ( ) |
Connect to the db |
|
disconnect ( ) |
Disconnect from db |
|
execute ( string $sql, mixed $arg1 = null, string $arg2 = null ) : resource |
Executes the SQL statement in the context of this connection. |
|
insert ( string $sql, mixed $arg1 = null, string $arg2 = null, string $pk = null, integer $idValue = null, string $sequenceName = null ) |
Returns the last auto-generated ID from the affected table. |
|
isActive ( ) : boolean |
Check if the connection is active |
|
quoteString ( string $string ) : string |
Quotes a string, escaping any ' (single quote) and \ (backslash)
characters. |
|
rollbackDbTransaction ( ) |
Rolls back the transaction (and turns on auto-committing). Must be
done if the transaction block raises an exception or returns false. |
|
select ( string $sql, mixed $arg1 = null, string $arg2 = null ) : Horde_Db_Adapter_Mysql_Result |
Returns an array of records with the column names as keys, and
column values as values. |
|
selectAll ( string $sql, mixed $arg1 = null, string $arg2 = null ) |
Returns an array of record hashes with the column names as keys and
column values as values. |
|
selectOne ( string $sql, mixed $arg1 = null, string $arg2 = null ) : array | boolean |
Returns a record hash with the column names as keys and column values as
values. |
|
selectValue ( string $sql, mixed $arg1 = null, string $arg2 = null ) : string |
Returns a single value from a record |
|
selectValues ( string $sql, mixed $arg1 = null, string $arg2 = null ) |
Returns an array of the values of the first column in a select:
select_values("SELECT id FROM companies LIMIT 3") => [1,2,3] |
|
supportsMigrations ( ) : boolean |
Does this adapter support migrations? Backend specific, as the
abstract adapter always returns +false+. |
|