Properties

$result

$result : resource

Database results

Type

resource

$connection

$connection : resource

Default database connection

Type

resource

$statement

$statement : mixed

Prepared statement

Type

mixed

$tables

$tables : array

Database tables

Type

array

$database

$database : string

Database

Type

string

$sql

$sql : string

SQL statement to prepare

Type

string

$statementSuccess

$statementSuccess : boolean

Prepared statement success

Type

boolean

Methods

getAvailableAdapters()

getAvailableAdapters() : array

Get the available database adapters

Returns

array

isAvailable()

isAvailable(string  $adapter) : boolean

Get the available image library adapters

Parameters

string $adapter

Returns

boolean

__construct()

__construct(array  $options) : \Pop\Db\Adapter\Sqlsrv

Constructor

Instantiate the SQLSrv database connection object.

Parameters

array $options

Throws

\Pop\Db\Adapter\Exception

Returns

\Pop\Db\Adapter\Sqlsrv

showError()

showError() : void

Throw an exception upon a database error.

Throws

\Pop\Db\Adapter\Exception

prepare()

prepare(string  $sql) : \Pop\Db\Adapter\Sqlsrv

Prepare a SQL query.

Parameters

string $sql

Returns

\Pop\Db\Adapter\Sqlsrv

bindParams()

bindParams(array  $params, mixed  $options = null) : \Pop\Db\Adapter\Sqlsrv

Bind parameters to a prepared SQL query.

Parameters

array $params
mixed $options

Returns

\Pop\Db\Adapter\Sqlsrv

execute()

execute() : void

Execute the prepared SQL query.

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

Close the DB connection.

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

isInstalled()

isInstalled() : boolean

Check if Sqlsrv is installed.

Returns

boolean

getErrors()

getErrors() : string

Get SQL errors

Returns

string

fetchRow()

fetchRow() : mixed

Fetch and return a row.

Returns

mixed

fetchResult()

fetchResult() : array

Fetch and return the values.

Returns

array

loadTables()

loadTables() : array

Get an array of the tables of the database.

Returns

array