Connection

Connection implements Connection

Database Connection.

Methods

__construct

Create the connection wrapper around a \PDO instance.

Connection::__construct( \PDO $pdo, array $config = array() )

getConnection

Get the current PDO connection.

Connection::getConnection( ): \PDO

Return Value: \PDO


selectOne

Run a select statement and return a single result.

Connection::selectOne( string $query, array $bindings = array() ): mixed

Return Value: mixed


select

Run a select statement against the database.

Connection::select( string $query, array $bindings = array() ): array

Return Value: array


insert

Run an insert statement and return the last insert ID.

Connection::insert( string $query, array $bindings = array() ): integer

Return Value: integer


update

Run an update statement against the database.

Connection::update( string $query, array $bindings = array() ): integer

Return Value: integer


delete

Run a delete statement against the database.

Connection::delete( string $query, array $bindings = array() ): integer

Return Value: integer


statement

Execute an SQL statement and return the boolean result.

Connection::statement( string $query, array $bindings = array() ): boolean

Return Value: boolean


affectingStatement

Run an SQL statement and get the number of rows affected.

Connection::affectingStatement( string $query, array $bindings = array() ): integer

Return Value: integer


executeQuery

Connection::executeQuery( $data, string $query, $error = null ): \PDOStatement

Return Value: \PDOStatement


getQuerySuccess

Connection::getQuerySuccess( ): boolean

Return Value: boolean


getResult

Connection::getResult( ): \PDOStatement

Return Value: \PDOStatement


Last updated : September 15, 2018 b92362d