\CGExtensions\querysql_query

A simple query class that generically accepts any SQL query.

descendents of this class should implement at least the limit, and offset parameters to allow the pagination class to work.

This class supports accessing members as either object members with the -> operator, or as array members with the [] operator.

Summary

Methods
Properties
Constants
__construct()
execute()
OffsetSet()
OffsetExists()
OffsetUnset()
$sql
$limit
$offset
$parms
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$sql

$sql : string

  • The SQL query to execute

Type

string

$limit

$limit : int

  • The number of elements to return in one recordset

Type

int

$offset

$offset : int

  • The offset to begin returning elements

Type

int

$parms

$parms : array

SQL Query parameters (must be specified in the proper order)

Type

array

Methods

__construct()

__construct(array $parms)

Constructor.

This method accepts an array of parameters, and sets internal data for the query object. Identically to calling $this['key'] = $val multiple times.

Parameters

array $parms

OffsetSet()

OffsetSet(string $key, mixed $value)

Set a value into the query object.

Parameters

string $key
mixed $value

OffsetExists()

OffsetExists(string $key) : bool

Test if the key is set in the data object.

Parameters

string $key

Returns

bool

OffsetUnset()

OffsetUnset(string $key)

Unset a variable in the object

Parameters

string $key