PDO Interface to implement for database drivers

package Query
subpackage Drivers

 Methods

Constructor/Connection method

__construct(string $dsn, \[string] $username = NULL, \[string] $password = NULL, \[array] $driver_options = array()) : void

Parameters

$dsn

string

$username

\[string]

$password

\[string]

$driver_options

\[array]

Begin a transaction

beginTransaction() : bool

Returns

bool

Commit a transaction

commit() : bool

Returns

bool

Return the current error code

errorCode() : mixed

Returns

mixed

Return information about the current error

errorInfo() : array

Returns

array

Execute an SQL statement and return the number of affected rows

exec(string $statement) : int

Parameters

$statement

string

Returns

int

Get a connection attribute for the current db driver

getAttribute(int $attribute) 
returm mixed

Parameters

$attribute

int

Rollback a transaction

rollback() : bool

Returns

bool

Set a connection attribute

setAttribute(int $attribute, mixed $value) : bool

Parameters

$attribute

int

$value

mixed

Returns

bool