Implementation of an adapter using the mySQLi module.
Methods
Constructor for WebLab_Data_MySQLi_Adapter.
__construct(mixed $login)
Parameters
$login
mixedCredentials to be used during connection setup.
Escape a string using the database specific escape function.
escape_string(string $str) : string
Parameters
$str
stringInput to be escaped.
Returns
stringEscaped version of $str.
Get database specific information.
getAdapterSpecification() : object
Inherited
This returns a reference to escape_string() and the wildcard.
Returns
object
Retrieve information about the database engine.
getAdapterSpecs() : mixed
This returns a reference to escape_string() and the wildcard.
Returns
mixedDatabase specification settings.
Return the prefix for this database.
getPrefix() : string
Inherited
| inherited_from |
\WebLab_Data_Adapter::getPrefix() |
Returns
string
Retrieve the last inserted id
insert_id() : int
Returns
intThe last inserted id.
Return whether adapter is connected.
isConnected() : boolean
Returns
booleanIs adapter connected?
Performs a query.
query(string $query)
Inherited
Prefixes the query tables if a prefix is specified.
| inherited_from |
\WebLab_Data_Adapter::query() |
Parameters
$query
string
Decrease transaction depth.
quitTransaction(boolean $commit)
Inherited
When transaction depth reaches 0 transaction will be commited.
When performing a rollback, transaction depth will be reset to 0 and the entire tree will be rolled back.
| inherited_from |
\WebLab_Data_Adapter::quitTransaction() |
Parameters
$commit
boolean
Set the prefix used while querying this database.
setPrefix(string $prefix) : \WebLab_Data_Adapter
Inherited
| inherited_from |
\WebLab_Data_Adapter::setPrefix() |
Parameters
$prefix
string
Returns
Start a transaction and increase the transaction depth
startTransaction()
Inherited
Notify the database engine that a transaction is to be stopped.
_quit_transaction(boolean $commit)
Parameters
$commit
booleanShould the result be saved
Notify the database engine that a transaction is about to start.
_start_transaction()
Properties
$error : string
Inherited
| inherited_from |
\WebLab_Data_Adapter::$$error |
$_original_strings : array
Inherited
| inherited_from |
\WebLab_Data_Adapter::$$_original_strings |
$_prefix : string
Inherited
| inherited_from |
\WebLab_Data_Adapter::$$_prefix |
$_resource : resource
Inherited
| inherited_from |
\WebLab_Data_Adapter::$$_resource |
$_transaction_depth : int
Inherited
This allows for transaction nesting.