Firebird Database class

PDO-firebird isn't stable, so this is a wrapper of the fbird_ public functions.
package Query
subpackage Drivers

 Methods

Open the link to the database

__construct(string $dbpath, string $user = 'SYSDBA', string $pass = 'masterkey', array $options = array()

Parameters

$dbpath

string

$user

string

$pass

string

$options

array

Start a database transaction

beginTransaction() : boolean | null

Returns

booleannull

Commit a database transaction

commit() : bool

Returns

bool

Method to emulate PDO->errorCode

errorCode() : array

Returns

array

Method to emulate PDO->errorInfo / PDOStatement->errorInfo

errorInfo() : array

Returns

array

Execute an sql statement and return number of affected rows

exec(string $sql) : int

Parameters

$sql

string

Returns

int

Implement for compatibility with PDO

getAttribute(int $attribute) : mixed

Parameters

$attribute

int

Returns

mixed

Return whether the current statement is in a transaction

inTransaction() : bool

Returns

bool

Create sql for batch insert

insert_batch(string $table, array $data = array()) : array

Parameters

$table

string

$data

array

Returns

array

Returns the last value of the specified generator

lastInsertId(string $name = NULL) : mixed

Parameters

$name

string

Returns

mixed

Emulate PDO prepare

prepare(string $query, array $options = array()) : \Query\Driver\Firebird_Result

Parameters

$query

string

$options

array

Exceptions

\Query\Driver\PDOException

Returns

Prepare and execute a query

prepare_execute(string $sql, array $args) : \Query\Driver\Firebird_Result

Parameters

$sql

string

$args

array

Returns

Bind a prepared query with arguments for executing

prepare_query(string $sql, array $params) : NULL

Parameters

$sql

string

$params

array

Returns

NULL

Wrapper public function to better match PDO

query(string $sql = '') : \Query\Driver\Firebird_Result

Parameters

$sql

string

Exceptions

\Query\Driver\PDOException

Returns

Method to emulate PDO->quote

quote(string $str, int $param_type = \PDO::PARAM_STR) : string

Parameters

$str

string

$param_type

int

Returns

string

Rollback a transaction

rollBack() : bool

Returns

bool

Set a connection attribute

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

Parameters

$attribute

int

$value

mixed

Returns

bool

Empty a database table

truncate(string $table) 

Parameters

$table

string

 Properties

 

Reference to the connection resource

$conn : resource

Default

NULL
 

Reference to the last query executed

$statement : object

Default

NULL
   

Reference to the current transaction

$trans : resource

Default

NULL