select()
select(string $fields) : \Query\QueryBuilderInterface
Specifies rows to select in a query
Parameters
string | $fields |
Interface defining the Query Builder class
select(string $fields) : \Query\QueryBuilderInterface
Specifies rows to select in a query
string | $fields |
selectMax(string $field, string|boolean $as = FALSE) : \Query\QueryBuilderInterface
Selects the maximum value of a field from a query
string | $field | |
string|boolean | $as |
selectMin(string $field, string|boolean $as = FALSE) : \Query\QueryBuilderInterface
Selects the minimum value of a field from a query
string | $field | |
string|boolean | $as |
selectAvg(string $field, string|boolean $as = FALSE) : \Query\QueryBuilderInterface
Selects the average value of a field from a query
string | $field | |
string|boolean | $as |
selectSum(string $field, string|boolean $as = FALSE) : \Query\QueryBuilderInterface
Selects the sum of a field from a query
string | $field | |
string|boolean | $as |
distinct() : \Query\QueryBuilderInterface
Adds the 'distinct' keyword to a query
explain() : \Query\QueryBuilderInterface
Shows the query plan for the query
from(string $tblname) : \Query\QueryBuilderInterface
Specify the database table to select from
string | $tblname |
like(string $field, mixed $val, string $pos = 'both') : \Query\QueryBuilderInterface
Creates a Like clause in the sql statement
string | $field | |
mixed | $val | |
string | $pos |
orLike(string $field, mixed $val, string $pos = 'both') : \Query\QueryBuilderInterface
Generates an OR Like clause
string | $field | |
mixed | $val | |
string | $pos |
notLike(string $field, mixed $val, string $pos = 'both') : \Query\QueryBuilderInterface
Generates a NOT LIKE clause
string | $field | |
mixed | $val | |
string | $pos |
orNotLike(string $field, mixed $val, string $pos = 'both') : \Query\QueryBuilderInterface
Generates a OR NOT LIKE clause
string | $field | |
mixed | $val | |
string | $pos |
having(mixed $key, mixed $val = array()) : \Query\QueryBuilderInterface
Generates a 'Having' clause
mixed | $key | |
mixed | $val |
orHaving(mixed $key, mixed $val = array()) : \Query\QueryBuilderInterface
Generates a 'Having' clause prefixed with 'OR'
mixed | $key | |
mixed | $val |
where(mixed $key, mixed $val = array(), boolean $escape = NULL) : \Query\QueryBuilderInterface
Specify condition(s) in the where clause of a query Note: this function works with key / value, or a passed array with key / value pairs
mixed | $key | |
mixed | $val | |
boolean | $escape |
orWhere(string $key, mixed $val = array()) : \Query\QueryBuilderInterface
Where clause prefixed with "OR"
string | $key | |
mixed | $val |
whereIn(mixed $field, mixed $val = array()) : \Query\QueryBuilderInterface
Where clause with 'IN' statement
mixed | $field | |
mixed | $val |
orWhereIn(string $field, mixed $val = array()) : \Query\QueryBuilderInterface
Where in statement prefixed with "or"
string | $field | |
mixed | $val |
whereNotIn(string $field, mixed $val = array()) : \Query\QueryBuilderInterface
WHERE NOT IN (FOO) clause
string | $field | |
mixed | $val |
orWhereNotIn(string $field, mixed $val = array()) : \Query\QueryBuilderInterface
OR WHERE NOT IN (FOO) clause
string | $field | |
mixed | $val |
set(mixed $key, mixed $val = NULL) : \Query\QueryBuilderInterface
Sets values for inserts / updates / deletes
mixed | $key | |
mixed | $val |
join(string $table, string $condition, string $type = '') : \Query\QueryBuilderInterface
Creates a join phrase in a compiled query
string | $table | |
string | $condition | |
string | $type |
groupBy(mixed $field) : \Query\QueryBuilderInterface
Group the results by the selected field(s)
mixed | $field |
orderBy(string $field, string $type = "") : \Query\QueryBuilderInterface
Order the results by the selected field(s)
string | $field | |
string | $type |
limit(integer $limit, integer|boolean $offset = FALSE) : \Query\QueryBuilderInterface
Set a limit on the current sql statement
integer | $limit | |
integer|boolean | $offset |
groupStart() : \Query\QueryBuilderInterface
Adds a paren to the current query for query grouping
notGroupStart() : \Query\QueryBuilderInterface
Adds a paren to the current query for query grouping, prefixed with 'NOT'
orGroupStart() : \Query\QueryBuilderInterface
Adds a paren to the current query for query grouping, prefixed with 'OR'
orNotGroupStart() : \Query\QueryBuilderInterface
Adds a paren to the current query for query grouping, prefixed with 'OR NOT'
groupEnd() : \Query\QueryBuilderInterface
Ends a query group