select()
select(string $fields) : \Query\Query_Builder
Specifies rows to select in a query
Parameters
string | $fields |
Interface defining the Query Builder class
select(string $fields) : \Query\Query_Builder
Specifies rows to select in a query
string | $fields |
select_max(string $field, string|boolean $as = FALSE) : \Query\Query_Builder
Selects the maximum value of a field from a query
string | $field | |
string|boolean | $as |
select_min(string $field, string|boolean $as = FALSE) : \Query\Query_Builder
Selects the minimum value of a field from a query
string | $field | |
string|boolean | $as |
select_avg(string $field, string|boolean $as = FALSE) : \Query\Query_Builder
Selects the average value of a field from a query
string | $field | |
string|boolean | $as |
select_sum(string $field, string|boolean $as = FALSE) : \Query\Query_Builder
Selects the sum of a field from a query
string | $field | |
string|boolean | $as |
distinct() : \Query\Query_Builder
Adds the 'distinct' keyword to a query
explain() : \Query\Query_Builder
Shows the query plan for the query
from(string $tblname) : \Query\Query_Builder
Specify the database table to select from
string | $tblname |
like(string $field, mixed $val, string $pos = 'both') : \Query\Query_Builder
Creates a Like clause in the sql statement
string | $field | |
mixed | $val | |
string | $pos |
or_like(string $field, mixed $val, string $pos = 'both') : \Query\Query_Builder
Generates an OR Like clause
string | $field | |
mixed | $val | |
string | $pos |
not_like(string $field, mixed $val, string $pos = 'both') : \Query\Query_Builder
Generates a NOT LIKE clause
string | $field | |
mixed | $val | |
string | $pos |
or_not_like(string $field, mixed $val, string $pos = 'both') : \Query\Query_Builder
Generates a OR NOT LIKE clause
string | $field | |
mixed | $val | |
string | $pos |
having(mixed $key, mixed $val = array()) : \Query\Query_Builder
Generates a 'Having' clause
mixed | $key | |
mixed | $val |
or_having(mixed $key, mixed $val = array()) : \Query\Query_Builder
Generates a 'Having' clause prefixed with 'OR'
mixed | $key | |
mixed | $val |
where(mixed $key, mixed $val = array(), boolean $escape = NULL) : \Query\Query_Builder
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 |
or_where(string $key, mixed $val = array()) : \Query\Query_Builder
Where clause prefixed with "OR"
string | $key | |
mixed | $val |
where_in(mixed $field, mixed $val = array()) : \Query\Query_Builder
Where clause with 'IN' statement
mixed | $field | |
mixed | $val |
or_where_in(string $field, mixed $val = array()) : \Query\Query_Builder
Where in statement prefixed with "or"
string | $field | |
mixed | $val |
where_not_in(string $field, mixed $val = array()) : \Query\Query_Builder
WHERE NOT IN (FOO) clause
string | $field | |
mixed | $val |
or_where_not_in(string $field, mixed $val = array()) : \Query\Query_Builder
OR WHERE NOT IN (FOO) clause
string | $field | |
mixed | $val |
set(mixed $key, mixed $val = NULL) : \Query\Query_Builder
Sets values for inserts / updates / deletes
mixed | $key | |
mixed | $val |
join(string $table, string $condition, string $type = '') : \Query\Query_Builder
Creates a join phrase in a compiled query
string | $table | |
string | $condition | |
string | $type |
group_by(mixed $field) : \Query\Query_Builder
Group the results by the selected field(s)
mixed | $field |
order_by(string $field, string $type = "") : \Query\Query_Builder
Order the results by the selected field(s)
string | $field | |
string | $type |
limit(integer $limit, integer|boolean $offset = FALSE) : \Query\Query_Builder
Set a limit on the current sql statement
integer | $limit | |
integer|boolean | $offset |
group_start() : \Query\Query_Builder
Adds a paren to the current query for query grouping
or_group_start() : \Query\Query_Builder
Adds a paren to the current query for query grouping, prefixed with 'OR'
or_not_group_start() : \Query\Query_Builder
Adds a paren to the current query for query grouping, prefixed with 'OR NOT'
group_end() : \Query\Query_Builder
Ends a query group