Documentation

Core_QueryBuilder_Update extends Core_QueryBuilder_Selection

UPDATE Database Abstraction Layer (DBAL)

http://dev.mysql.com/doc/refman/5.5/en/update.html

// UPDATE `tableName` SET `column1` = 'value', `column2` = 'value2' // WHERE `column` != '5' AND `a4` IN (17, 19, NULL) ORDER BY `column2` ASC LIMIT 10 $update = Core_QueryBuilder::update('tableName') ->columns(array('column1' => 'value', 'column2' => 'value2')) ->where('column', '!=', '5') ->where('a4', 'IN', array(17,19, NULL)) ->orderBy('column2') ->limit(10) ->execute(); // UPDATE `tableName` SET `column1` = 'value', `column2` = 'value2' WHERE `column` = '5' $oCore_QueryBuilder_Update = Core_QueryBuilder::update('tableName') ->set('column1', 'value') ->set('column2', 'value2') ->where('column', '=', '5') ->execute();
Tags
subpackage

Core\Querybuilder

version
7.x
author

Hostmake LLC

copyright

© 2005-2022 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

$_columns  : array<string|int, mixed>
List of columns
$_dataBase  : mixed
DataBase
$_defaultOperator  : string
Default operator between conditions
$_ignore  : mixed
IGNORE
$_indexHints  : array<string|int, mixed>
Index Hints
$_join  : array<string|int, mixed>
JOIN
$_limit  : mixed
LIMIT
$_offset  : mixed
OFFSET
$_operator  : string
Current operator
$_orderBy  : array<string|int, mixed>
ORDER BY
$_partition  : array<string|int, mixed>
PARTITION
$_priority  : mixed
LOW_PRIORITY
$_queryType  : mixed
DataBase Query Type 2 - UPDATE
$_tableName  : string
Name of the table
$_unbuffered  : mixed
Query without fetching and buffering the result rows
$_where  : array<string|int, mixed>
WHERE
__call()  : mixed
Triggered when invoking inaccessible methods in an object context
__construct()  : mixed
Constructor.
__set()  : self
Run when writing data to inaccessible properties
asAssoc()  : self
Set result type as an array
asObject()  : self
Set result type as an object with className
build()  : string
Build the SQL query
clear()  : Core_QueryBuilder_Update
Clear
clearIndexHints()  : self
Clear Index Hints
clearJoin()  : self
Clear JOIN
clearLimit()  : self
Clear LIMIT
clearOffset()  : self
Clear OFFSET
clearOrderBy()  : self
Clear ORDER BY
clearWhere()  : self
Clear WHERE list
close()  : self
Close bracket in WHERE
columns()  : Core_QueryBuilder_Update
Add multiple columns for UPDATE
crossJoin()  : self
In MySQL, CROSS JOIN is a syntactic equivalent to INNER JOIN (they can replace each other).
deleteFirstWhere()  : self
Delete first WHERE condition
deleteLastWhere()  : self
Delete last WHERE condition
execute()  : Core_DataBase
Execute query
firstJoin()  : self
Add INNER JOIN first
firstLeftJoin()  : self
Add LEFT OUTER JOIN first
getDataBase()  : Core_DataBase
Get DataBase
getJoin()  : array<string|int, mixed>
Get JOIN
getOrderBy()  : array<string|int, mixed>
Get ORDER BY
getWhere()  : array<string|int, mixed>
Get WHERE
ignore()  : Core_QueryBuilder_Update
Set IGNORE
indexHint()  : self
Add Index Hints https://dev.mysql.com/doc/refman/5.7/en/index-hints.html
join()  : self
INNER JOIN
leftJoin()  : self
LEFT OUTER JOIN
limit()  : self
Set limit and offset
lowPriority()  : Core_QueryBuilder_Update
Set LOW_PRIORITY
naturalJoin()  : self
<code> // NATURAL JOIN `join1` $Core_QueryBuilder_Select->naturalJoin('join1'); </code>
offset()  : self
Set offset
open()  : self
Open bracket in WHERE
order()  : mixed
Order options
orderBy()  : self
Set order column and direction
orderByRaw()  : self
Add raw expression into ORDER BY.
orWhere()  : self
Add OR and WHERE, e.g. WHERE ... OR $column $expression $value
orWhereBetween()  : self
Add OR and WHERE $column BETWEEN x AND y
orWhereColumn()  : self
Set OR and verify two columns
orWhereIn()  : self
Add OR and WHERE $column IN (x, y)
orWhereIsNotNull()  : self
Add OR and WHERE $column IS NOT NULL
orWhereIsNull()  : self
Add OR and WHERE $column IS NULL
orWhereNotBetween()  : self
Add OR and WHERE $column NOT BETWEEN x AND y
orWhereNotIn()  : self
Add OR and WHERE $column NOT IN (x, y)
partition()  : Core_QueryBuilder_Select
Set PARTITION
quoteTable()  : array<string|int, mixed>
Quote columns
rightJoin()  : self
RIGHT OUTER JOIN
rightJoinFirst()  : self
Add RIGHT OUTER JOIN first
set()  : Core_QueryBuilder_Update
Add column for UPDATE
setAnd()  : self
Set operator as AND
setDataBase()  : Core_QueryBuilder_Statement
Set DataBase
setDefaultOperator()  : self
Set operator as a default operator
setOperator()  : self
Set operator as a default operator
setOr()  : self
Set operator as OR
table()  : Core_QueryBuilder_Update
Add table name
unbuffered()  : self
Query without fetching and buffering the result rows
where()  : self
Add WHERE
whereBetween()  : self
Add WHERE $column BETWEEN x AND y
whereColumn()  : self
Verify two columns
whereIn()  : self
Add WHERE $column IN (x, y)
whereIsNotNull()  : self
Add WHERE $column IS NOT NULL
whereIsNull()  : self
Add WHERE $column IS NULL
whereNotBetween()  : self
Add WHERE $column NOT BETWEEN x AND y
whereNotIn()  : self
Add WHERE $column NOT IN (x, y)
whereRaw()  : self
Add raw expression into WHERE.
_buildExpression()  : string
Build WHERE or HAVING expression
_buildIndexHint()  : string
Build INDEX expression
_buildJoin()  : string
Build JOIN expression
_buildOrderBy()  : string
Build ORDER BY expression
_buildSet()  : string
Build SET expression
_buildWhere()  : string
Build expression for one condition
_isObjectSelect()  : bool
Is $object Core_QueryBuilder_Select
_join()  : self
http://dev.mysql.com/doc/refman/5.7/en/join.html
_quoteColumns()  : array<string|int, mixed>
Quote columns
_quoteTables()  : array<string|int, mixed>
Quote columns
_quoteValues()  : array<string|int, mixed>
Quote arary of values

Properties

$_columns

List of columns

protected array<string|int, mixed> $_columns = array()

$_dataBase

DataBase

protected mixed $_dataBase = \NULL

$_defaultOperator

Default operator between conditions

protected string $_defaultOperator = 'AND'

$_ignore

IGNORE

protected mixed $_ignore = \NULL

$_indexHints

Index Hints

protected array<string|int, mixed> $_indexHints = array()

$_join

JOIN

protected array<string|int, mixed> $_join = array()

$_limit

LIMIT

protected mixed $_limit = \NULL

$_offset

OFFSET

protected mixed $_offset = \NULL

$_operator

Current operator

protected string $_operator = ''

$_orderBy

ORDER BY

protected array<string|int, mixed> $_orderBy = array()

$_partition

PARTITION

protected array<string|int, mixed> $_partition = array()

$_priority

LOW_PRIORITY

protected mixed $_priority = \NULL

$_queryType

DataBase Query Type 2 - UPDATE

protected mixed $_queryType = 2

$_tableName

Name of the table

protected string $_tableName = array()

$_unbuffered

Query without fetching and buffering the result rows

protected mixed $_unbuffered = \FALSE

$_where

WHERE

protected array<string|int, mixed> $_where = array()

Methods

__call()

Triggered when invoking inaccessible methods in an object context

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string

method name

$arguments : array<string|int, mixed>

arguments

Return values
mixed

__construct()

Constructor.

public __construct([array<string|int, mixed> $args = array() ]) : mixed
Parameters
$args : array<string|int, mixed> = array()

list of arguments $oCore_QueryBuilder_Update = Core_QueryBuilder::update('tableName');

$oCore_QueryBuilder_Update = Core_QueryBuilder::update('tableName', array('tableName2', 'aliasTable2'));
Tags
see
table()
Return values
mixed

__set()

Run when writing data to inaccessible properties

public __set(string $property, string $value) : self
Parameters
$property : string

property name

$value : string

property value

Return values
self

asAssoc()

Set result type as an array

public asAssoc() : self
Return values
self

asObject()

Set result type as an object with className

public asObject([mixed $className = NULL ]) : self
Parameters
$className : mixed = NULL

Object class name

Return values
self

build()

Build the SQL query

public build() : string
Return values
string

The SQL query

clearIndexHints()

Clear Index Hints

public clearIndexHints() : self
Return values
self

clearJoin()

Clear JOIN

public clearJoin() : self
Return values
self

clearLimit()

Clear LIMIT

public clearLimit() : self
Return values
self

clearOffset()

Clear OFFSET

public clearOffset() : self
Return values
self

clearOrderBy()

Clear ORDER BY

public clearOrderBy() : self
Return values
self

clearWhere()

Clear WHERE list

public clearWhere() : self
Return values
self

close()

Close bracket in WHERE

public close() : self
Return values
self

columns()

Add multiple columns for UPDATE

public columns(array<string|int, mixed> $args) : Core_QueryBuilder_Update
// UPDATE `tableName` SET `column` = 'value', `column2` = 'value3' $oCore_QueryBuilder_Update = Core_QueryBuilder::update('tableName') ->columns(array('column' => 'value', 'column2' => 'value3'));
Parameters
$args : array<string|int, mixed>

array of columns

Return values
Core_QueryBuilder_Update

crossJoin()

In MySQL, CROSS JOIN is a syntactic equivalent to INNER JOIN (they can replace each other).

public crossJoin(string $table) : self

In standard SQL, they are not equivalent. INNER JOIN is used with an ON clause, CROSS JOIN is used otherwise.

// CROSS JOIN `join1` $Core_QueryBuilder_Select->crossJoin('join1');
Parameters
$table : string

table name

Return values
self

deleteFirstWhere()

Delete first WHERE condition

public deleteFirstWhere() : self
Return values
self

deleteLastWhere()

Delete last WHERE condition

public deleteLastWhere() : self
Return values
self

firstJoin()

Add INNER JOIN first

public firstJoin(string $table, string $column[, string|null $expression = NULL ][, string|null $value = NULL ][, string|null $additionalConditions = NULL ]) : self
Parameters
$table : string

table name

$column : string

column name

$expression : string|null = NULL

expression

$value : string|null = NULL

value

$additionalConditions : string|null = NULL

additional conditions

Return values
self

firstLeftJoin()

Add LEFT OUTER JOIN first

public firstLeftJoin(string $table, string $column[, string|null $expression = NULL ][, string|null $value = NULL ][, string|null $additionalConditions = NULL ]) : self
Parameters
$table : string

table name

$column : string

column name

$expression : string|null = NULL

expression

$value : string|null = NULL

value

$additionalConditions : string|null = NULL

additional conditions

Return values
self

getJoin()

Get JOIN

public getJoin() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOrderBy()

Get ORDER BY

public getOrderBy() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWhere()

Get WHERE

public getWhere() : array<string|int, mixed>
Return values
array<string|int, mixed>

indexHint()

Add Index Hints https://dev.mysql.com/doc/refman/5.7/en/index-hints.html

public indexHint(string $tableName, array<string|int, mixed> $options) : self
// USE INDEX (`col1_index`) $Core_QueryBuilder_Select->indexHint('table1', array('USE INDEX', 'col1_index'));

// USE INDEX FOR JOIN (col1_index, col2_index) $Core_QueryBuilder_Select->indexHint('table1', array('USE INDEX', 'FOR JOIN', array('col1_index', 'col2_index')));

Parameters
$tableName : string

table name

$options : array<string|int, mixed>

[$action, $index_list] or [$action, $for, $index_list]

Return values
self

join()

INNER JOIN

public join(string $table, string $column[, string|null $expression = NULL ][, string|null $value = NULL ][, string|null $additionalConditions = NULL ]) : self
// INNER JOIN `join1` USING (`join_field`) $Core_QueryBuilder_Select->join('join1', 'join_field');

// INNER JOIN jointable.join1 ON join_field = join_field2 $Core_QueryBuilder_Select->join('jointable.join1', 'join_field1', '=', 'join_field2');

// INNER JOIN jointable.join1 ON join_field = join_field2 AND A = '123' AND B = 'xyz' $Core_QueryBuilder_Select->join('jointable.join1', 'join_field1', '=', 'join_field2', array( array('AND' => array('A', '=', '123')), array('AND' => array('B', '=', 'xyz')) ));

Parameters
$table : string

table name

$column : string

column name

$expression : string|null = NULL

expression

$value : string|null = NULL

value

$additionalConditions : string|null = NULL

additional conditions

Return values
self

leftJoin()

LEFT OUTER JOIN

public leftJoin(string $table, string $column[, string|null $expression = NULL ][, string|null $value = NULL ][, string|null $additionalConditions = NULL ]) : self
// LEFT OUTER JOIN `join1` USING (`join_field2`) $Core_QueryBuilder_Select->leftJoin('join1', 'join_field2');

// LEFT OUTER JOIN jointable.join1 ON join_field = join_field2 $Core_QueryBuilder_Select->leftJoin('jointable.join1', 'join_field', '=', 'join_field2');

Parameters
$table : string

table name

$column : string

column name

$expression : string|null = NULL

expression

$value : string|null = NULL

value

$additionalConditions : string|null = NULL

additional conditions

Return values
self

limit()

Set limit and offset

public limit(int $arg1[, int $arg2 = NULL ]) : self
// LIMIT 10 $Core_QueryBuilder_Select->limit(10);

// LIMIT 10 OFFSET 0 $Core_QueryBuilder_Select->limit(0, 10);

Parameters
$arg1 : int
$arg2 : int = NULL
Return values
self

naturalJoin()

<code> // NATURAL JOIN `join1` $Core_QueryBuilder_Select->naturalJoin('join1'); </code>

public naturalJoin(string $table) : self
Parameters
$table : string

table name

Return values
self

offset()

Set offset

public offset(int|null $offset) : self
// OFFSET 10 $Core_QueryBuilder_Select->offset(10);
Parameters
$offset : int|null

offset

Return values
self

open()

Open bracket in WHERE

public open() : self
Return values
self

order()

Order options

public order(string $column[, string $direction = 'ASC' ][, bool $binary = FALSE ]) : mixed
Parameters
$column : string

column

$direction : string = 'ASC'

sorting direction

$binary : bool = FALSE

binary option

Tags
see
orderBy()
Return values
mixed

orderBy()

Set order column and direction

public orderBy(string $column[, string $direction = 'ASC' ][, bool $binary = FALSE ]) : self

http://dev.mysql.com/doc/refman/5.7/en/sorting-rows.html

// ORDER BY `field1` ASC $Core_QueryBuilder_Select->orderBy('field1');

// ORDER BY field1 DESC $Core_QueryBuilder_Select->orderBy('field1', 'DESC');

// ORDER BY BINARY field1 DESC $Core_QueryBuilder_Select->orderBy('field1', 'DESC', TRUE);

// ORDER BY field2 RAND() $Core_QueryBuilder_Select->orderBy('field1', 'RAND()');

Parameters
$column : string

column

$direction : string = 'ASC'

sorting direction

$binary : bool = FALSE

binary option

Return values
self

orderByRaw()

Add raw expression into ORDER BY.

public orderByRaw(string $expr) : self

ATTENTION! Danger, you should escape the query yourself!

// ORDER BY `field1` + `field2` ASC $Core_QueryBuilder_Select->orderByRaw('`field1` + `field2` ASC');
Parameters
$expr : string

expression

Return values
self

orWhere()

Add OR and WHERE, e.g. WHERE ... OR $column $expression $value

public orWhere(string $column[, string $expression = NULL ][, string $value = NULL ]) : self
// WHERE `a1` > 2 OR `a2` < 7 $Core_QueryBuilder_Select->where('a1', '>', 2)->orWhere('a2', '<', 7);
Parameters
$column : string

column

$expression : string = NULL

expression

$value : string = NULL

value

Return values
self

orWhereBetween()

Add OR and WHERE $column BETWEEN x AND y

public orWhereBetween(string $column, string $from, string $to) : self
// WHERE ... OR `a7` BETWEEN 1 AND 10 $Core_QueryBuilder_Select->orWhereBetween('a7', 1, 10);
Parameters
$column : string

column

$from : string
$to : string
Return values
self

orWhereColumn()

Set OR and verify two columns

public orWhereColumn(string $column1, string $expression, string $column2) : self
// WHERE ... OR `a1` = `a2` $Core_QueryBuilder_Select->orWhereColumn('a1', '=', 'a2');
Parameters
$column1 : string

first column

$expression : string

expression

$column2 : string

second column

Return values
self

orWhereIn()

Add OR and WHERE $column IN (x, y)

public orWhereIn(string $column, string $value) : self
// WHERE ... OR `a7` IN (1, 2, 'aaa') $Core_QueryBuilder_Select->orWhereIn('a7', array(1, 2, 'aaa'));
Parameters
$column : string

column

$value : string

value

Return values
self

orWhereIsNotNull()

Add OR and WHERE $column IS NOT NULL

public orWhereIsNotNull(string $column) : self
// WHERE `a1` IS NOT NULL $Core_QueryBuilder_Select->orWhereIsNotNull('a1');
Parameters
$column : string

column

Return values
self

orWhereIsNull()

Add OR and WHERE $column IS NULL

public orWhereIsNull(string $column) : self
// WHERE `a1` IS NULL OR `a2` IS NULL $Core_QueryBuilder_Select->whereIsNull('a1')->orWhereIsNull('a2');
Parameters
$column : string

column

Return values
self

orWhereNotBetween()

Add OR and WHERE $column NOT BETWEEN x AND y

public orWhereNotBetween(string $column, string $from, string $to) : self
// WHERE ... OR `a7` NOT BETWEEN 1 AND 10 $Core_QueryBuilder_Select->orWhereNotBetween('a7', 1, 10);
Parameters
$column : string

column

$from : string
$to : string
Return values
self

orWhereNotIn()

Add OR and WHERE $column NOT IN (x, y)

public orWhereNotIn(string $column, string $value) : self
// WHERE ... OR `a7` NOT IN (1, 2, 'aaa') $Core_QueryBuilder_Select->orWhereNotIn('a7', array(1, 2, 'aaa'));
Parameters
$column : string

column

$value : string

value

Return values
self

partition()

Set PARTITION

public partition(mixed $tableName, array<string|int, mixed> $partitions) : Core_QueryBuilder_Select
// FROM|JOIN `tableName` PARTITION (`p0`, `p1`) $oCore_QueryBuilder_Select = $Core_QueryBuilder_Select->from('tableName')->partition('tableName', array('p0', 'p1'));
Parameters
$tableName : mixed
$partitions : array<string|int, mixed>
Return values
Core_QueryBuilder_Select

quoteTable()

Quote columns

public quoteTable(mixed $tableName) : array<string|int, mixed>
Parameters
$tableName : mixed
Return values
array<string|int, mixed>

rightJoin()

RIGHT OUTER JOIN

public rightJoin(string $table, string $column[, string $expression = NULL ][, string $value = NULL ][, string $additionalConditions = NULL ]) : self
// RIGHT OUTER JOIN `join1` USING (`join_field2`) $Core_QueryBuilder_Select->rightJoin('join1', 'join_field2');

// RIGHT OUTER JOIN jointable.join1 ON join_field = join_field2 $Core_QueryBuilder_Select->rightJoin('jointable.join1', 'join_field', '=', 'join_field2');

Parameters
$table : string

table name

$column : string

column name

$expression : string = NULL

expression

$value : string = NULL

value

$additionalConditions : string = NULL

additional conditions

Return values
self

rightJoinFirst()

Add RIGHT OUTER JOIN first

public rightJoinFirst(string $table, string $column[, string $expression = NULL ][, string $value = NULL ][, string $additionalConditions = NULL ]) : self
Parameters
$table : string

table name

$column : string

column name

$expression : string = NULL

expression

$value : string = NULL

value

$additionalConditions : string = NULL

additional conditions

Return values
self

set()

Add column for UPDATE

public set(string $column, string $value) : Core_QueryBuilder_Update
// UPDATE `tableName` SET `column` = 'value' $oCore_QueryBuilder_Update = Core_QueryBuilder::update('tableName') ->set('column', 'value');
Parameters
$column : string

column name

$value : string

column value

Return values
Core_QueryBuilder_Update

setAnd()

Set operator as AND

public setAnd() : self
Return values
self

setDefaultOperator()

Set operator as a default operator

public setDefaultOperator() : self
Return values
self

setOperator()

Set operator as a default operator

public setOperator(string $operator) : self
Parameters
$operator : string
Return values
self

setOr()

Set operator as OR

public setOr() : self
Return values
self

unbuffered()

Query without fetching and buffering the result rows

public unbuffered(bool $unbuffered) : self
Parameters
$unbuffered : bool
Return values
self

where()

Add WHERE

public where(string $column[, string $expression = NULL ][, string $value = NULL ]) : self
// WHERE `a1` > '2' $Core_QueryBuilder_Select->where('a1', '>', '2');

// WHERE a4 IN (17, 19, NULL, 'NULL') $Core_QueryBuilder_Select->where('a4', 'IN', array(17, 19, NULL, 'NULL'));

// WHERE a7 BETWEEN 1 AND 10 $Core_QueryBuilder_Select->where('a7', 'BETWEEN', array(1, 10));

Parameters
$column : string

column

$expression : string = NULL

expression

$value : string = NULL

value

Return values
self

whereBetween()

Add WHERE $column BETWEEN x AND y

public whereBetween(string $column, string $from, string $to) : self
// WHERE `a7` BETWEEN 1 AND 10 $Core_QueryBuilder_Select->whereBetween('a7', 1, 10);
Parameters
$column : string

column

$from : string
$to : string
Return values
self

whereColumn()

Verify two columns

public whereColumn(string $column1, string $expression, string $column2) : self
// WHERE `a1` = `a2` $Core_QueryBuilder_Select->whereColumn('a1', '=', 'a2');
Parameters
$column1 : string

first column

$expression : string

expression

$column2 : string

second column

Return values
self

whereIn()

Add WHERE $column IN (x, y)

public whereIn(string $column, string $value) : self
// WHERE `a7` IN (1, 2, 'aaa') $Core_QueryBuilder_Select->whereIn('a7', array(1, 2, 'aaa'));
Parameters
$column : string

column

$value : string

value

Return values
self

whereIsNotNull()

Add WHERE $column IS NOT NULL

public whereIsNotNull(string $column) : self
// WHERE `a2` IS NOT NULL $Core_QueryBuilder_Select->whereIsNotNull('a2');
Parameters
$column : string

column

Return values
self

whereIsNull()

Add WHERE $column IS NULL

public whereIsNull(string $column) : self
// WHERE `a1` IS NULL $Core_QueryBuilder_Select->whereIsNull('a1');
Parameters
$column : string

column

Return values
self

whereNotBetween()

Add WHERE $column NOT BETWEEN x AND y

public whereNotBetween(string $column, string $from, string $to) : self
// WHERE `a7` NOT BETWEEN 1 AND 10 $Core_QueryBuilder_Select->whereNotBetween('a7', 1, 10);
Parameters
$column : string

column

$from : string
$to : string
Return values
self

whereNotIn()

Add WHERE $column NOT IN (x, y)

public whereNotIn(string $column, string $value) : self
// WHERE `a7` NOT IN (1, 2, 'aaa') $Core_QueryBuilder_Select->whereNotIn('a7', array(1, 2, 'aaa'));
Parameters
$column : string

column

$value : string

value

Return values
self

whereRaw()

Add raw expression into WHERE.

public whereRaw(string $expr) : self

ATTENTION! Danger, you should escape the query yourself!

// WHERE `a1` > 2 $Core_QueryBuilder_Select->whereRaw("`a1` > 2");
Parameters
$expr : string

expression

Return values
self

_buildExpression()

Build WHERE or HAVING expression

protected _buildExpression(array<string|int, mixed> $aConditions) : string
Parameters
$aConditions : array<string|int, mixed>

list of conditions

Tags
see
_buildWhere()
Return values
string

The SQL query

_buildIndexHint()

Build INDEX expression

protected _buildIndexHint(array<string|int, mixed> $aTableIndexHints) : string
Parameters
$aTableIndexHints : array<string|int, mixed>
Return values
string

The SQL query

_buildJoin()

Build JOIN expression

protected _buildJoin(array<string|int, mixed> $aJoins) : string
Parameters
$aJoins : array<string|int, mixed>
Return values
string

The SQL query

_buildOrderBy()

Build ORDER BY expression

protected _buildOrderBy(array<string|int, mixed> $aOrderBy) : string
Parameters
$aOrderBy : array<string|int, mixed>
Return values
string

The SQL query

_buildSet()

Build SET expression

protected _buildSet(array<string|int, mixed> $columns) : string
Parameters
$columns : array<string|int, mixed>

columns list

Return values
string

The SQL query

_buildWhere()

Build expression for one condition

protected _buildWhere(string $column, string $expression, string $value) : string
Parameters
$column : string

column

$expression : string

expression

$value : string

value

Tags
see
_buildExpression()
Return values
string

The SQL query

_isObjectSelect()

Is $object Core_QueryBuilder_Select

protected _isObjectSelect( $object) : bool
Parameters
$object :
Return values
bool

_join()

http://dev.mysql.com/doc/refman/5.7/en/join.html

protected _join(string $type, string $table[, string|null $column = NULL ][, string|null $expression = NULL ][, string|null $value = NULL ][, string|null $additionalConditions = NULL ][, mixed $mode = NULL ]) : self
Parameters
$type : string

join type

$table : string

table name

$column : string|null = NULL

column name

$expression : string|null = NULL

expression

$value : string|null = NULL

value

$additionalConditions : string|null = NULL

additional conditions

$mode : mixed = NULL
Return values
self

_quoteColumns()

Quote columns

protected _quoteColumns(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

_quoteTables()

Quote columns

protected _quoteTables(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

_quoteValues()

Quote arary of values

protected _quoteValues(array<string|int, mixed> $array) : array<string|int, mixed>
Parameters
$array : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results