WIKINDX API 6.4.9

SQL
in package

SQL

SQL abstraction layer for using MySQL.

Table of Contents

$endTimer  : mixed
mixed
$handle  : mixed
object
$joinUpdate  : mixed
array
$startTimer  : mixed
mixed
elapsedTime()  : int
Return the time elapsed betwen two UNIX timestamp with microseconds
formatAlias()  : string
Format fields as aliases
formatAliasWithExceptions()  : string
Format fields as aliases
formatUpdate()  : string
Format fields for an UPDATE statement
formatValues()  : string
Format field values for database type
getConnectionError()  : mixed
Get error information from db drivers at execution
getErrorMsg()  : mixed
getExecutionError()  : mixed
Get error information from db drivers at connection
internalQuery()  : mixed
Execute queries and return recordset
sqlDie()  : mixed
Die or throw an exception depending on the configuration
sqlTimerOff()  : mixed
Turn SQL timer OFF
sqlTimerOn()  : mixed
Turn SQL timer ON
subClause()  : string
Formulate subclause after main query

Properties

$endTimer

mixed

private mixed $endTimer

$handle

object

private mixed $handle = NULL

$joinUpdate

array

private mixed $joinUpdate = []

$startTimer

mixed

private mixed $startTimer

Methods

elapsedTime()

Return the time elapsed betwen two UNIX timestamp with microseconds

private elapsedTime() : int
Return values
int

formatAlias()

Format fields as aliases

private formatAlias(array<string|int, mixed> $array[, string $table = FALSE ][, string $tidyLeft = TRUE ]) : string
Parameters
$array : array<string|int, mixed>

Field => Alias

$table : string = FALSE

Default is FALSE. If TRUE, prepend table name to alias

$tidyLeft : string = TRUE

Default is TRUE. If FALSE, do not quote the left hand side of the alias

Return values
string

formatAliasWithExceptions()

Format fields as aliases

private formatAliasWithExceptions(array<string|int, mixed> $array, string $tidyLeft) : string

Array keys are checked for UNIX_TIMESTAMP or DATE_FORMAT

Parameters
$array : array<string|int, mixed>

Field => Alias

$tidyLeft : string

Default is TRUE. If FALSE, do not quote the left hand side of the alias

Return values
string

formatUpdate()

Format fields for an UPDATE statement

private formatUpdate(array<string|int, mixed> $array) : string
Parameters
$array : array<string|int, mixed>
Tags
see
ADOSQL::update
Return values
string

formatValues()

Format field values for database type

private formatValues(mixed $values) : string
Parameters
$values : mixed

Array of values or single value

Return values
string

getConnectionError()

Get error information from db drivers at execution

private getConnectionError() : mixed
Return values
mixed

getErrorMsg()

private getErrorMsg(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

getExecutionError()

Get error information from db drivers at connection

private getExecutionError() : mixed
Return values
mixed

internalQuery()

Execute queries and return recordset

private internalQuery(string $querystring, bool $bNoError) : mixed

If WIKINDX_DEBUG_SQL is TRUE then the script always die on db error.

Parameters
$querystring : string
$bNoError : bool

Default is FALSE

Return values
mixed

An array, or a boolean if there are no data to return. Only the first result set is returned

sqlDie()

Die or throw an exception depending on the configuration

private sqlDie(string $errorMessage[, string $beautified = "" ]) : mixed
Parameters
$errorMessage : string
$beautified : string = ""

Offending SQL statement

Return values
mixed

sqlTimerOff()

Turn SQL timer OFF

private sqlTimerOff() : mixed
Return values
mixed

sqlTimerOn()

Turn SQL timer ON

private sqlTimerOn() : mixed
Return values
mixed

subClause()

Formulate subclause after main query

private subClause() : string
Return values
string

Search results