__construct()
driver_exec()
execute()
limit()
limit_from()
limit_size()
order()
set()
where()
_fieldParser()
_limitFromParse()
_limitParse()
_orderParse()
_qbGlue()
_qbtext()
_whereParse()
$_dbcon
$_execute
$_fields
$_limit_from
$_limit_size
$_order
$_set
$_table
$_type
$_where
ASC
DESC
Helper for creating a mysql query (SELECT, INSERT, UPDATE, DELETE, TRUNCATE).
package | webkdb |
---|---|
author | thg2oo6 |
copyright | Copyright (c) 2012 |
version | 1.0 |
access | public |
__construct(string $type, string $table, mixed $fields)
string
The type of the SQL Query string.
string
The table where we perform the query.
mixed
The fields requested.
driver_exec(\WebKDBDriver $db_con, string $type, string $table, mixed $fields) : \QueryBuilder
To be used only with the driver class.
string
The type of the SQL Query string.
string
The table where we perform the query.
mixed
The fields requested.
execute() : mixed
mixed
limit(integer $size, integer $from) : void
integer
The size of the query.
integer
From where the query will start.
limit_from(integer $from) : void
integer
The position from where the query will start.
limit_size(integer $size) : void
integer
The size of the LIMIT.
order(string $key, string $how) : void
string
The key after what we order.
string
The method of orderding (ASC/DESC).
set(string $key, string $value, string $type) : void
string
The key to recive a value.
string
The value to be set for a key.
string
The type of the value (MYSQL, INTEGER, BLOB, STRING).
where(string $key, string $value, string $operator, string $linking) : void
string
The key needed in the query string.
string
The value for the key.
string
The operator between the key and the value.
string
The link between the elements of the WHERE clause.
_fieldParser(mixed $fields, boolean $hasKeys) : array
mixed
The list of fields. It may be separated by: ',', ' ', '|'. Also it can be an array.
boolean
If the fields are sent as an associative array, this field must be set to true.
array
_limitFromParse() : string
string
_limitParse() : string
string
_orderParse() : string
string
_qbGlue(array $array, string $glue) : array
array
The array to be parsed.
string
The glue used to transform the array into a string.
array
_qbtext() : string
(SELECT, INSERT, UPDATE,
string
_whereParse() : string
string
$_execute : boolean
$_fields : array
$_limit_from : integer
$_limit_size : integer
$_order : array
$_set : array
$_table : string
$_type : string
$_where : array
ASC
Defines an ASCENDING order.
DESC
Defines an DESCENDING order.