\Pop\Db\AdapterAdapterInterface

Db adapter interface

Summary

Methods
Constants
showError()
query()
fetch()
escape()
lastId()
numberOfRows()
numberOfFields()
hasResult()
getResult()
isConnected()
getConnection()
disconnect()
getTables()
version()
isPdo()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

showError()

showError() : void

Throw an exception upon a database error.

Throws

\Pop\Db\Adapter\Exception

query()

query(string  $sql) : void

Execute the SQL query and create a result resource, or display the SQL error.

Parameters

string $sql

fetch()

fetch() : array

Return the results array from the results resource.

Throws

\Pop\Db\Adapter\Exception

Returns

array

escape()

escape(string  $value) : string

Return the escaped string value.

Parameters

string $value

Returns

string

lastId()

lastId() : integer

Return the auto-increment ID of the last query.

Returns

integer

numberOfRows()

numberOfRows() : integer

Return the number of rows in the result.

Throws

\Pop\Db\Adapter\Exception

Returns

integer

numberOfFields()

numberOfFields() : integer

Return the number of fields in the result.

Throws

\Pop\Db\Adapter\Exception

Returns

integer

hasResult()

hasResult() : boolean

Determine whether or not an result resource exists

Returns

boolean

getResult()

getResult() : resource

Get the result resource

Returns

resource

isConnected()

isConnected() : boolean

Determine whether or not connected

Returns

boolean

getConnection()

getConnection() : resource

Get the connection resource

Returns

resource

disconnect()

disconnect() : void

Disconnect from the database

getTables()

getTables() : array

Get an array of the tables of the database.

Returns

array

version()

version() : string

Return the database version.

Returns

string

isPdo()

isPdo() : boolean

Return if the adapter is a PDO adapter

Returns

boolean