CI_DB_query_builder::select_min()

select_min([$select = ''[, $alias = '']]) Parameters: $select (string) – Field to compute the minimum of $alias (string) – Alias for the resulting value name Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a SELECT MIN(field) clause to a query.

CI_DB_query_builder::select_max()

select_max([$select = ''[, $alias = '']]) Parameters: $select (string) – Field to compute the maximum of $alias (string) – Alias for the resulting value name Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a SELECT MAX(field) clause to a query.

CI_DB_query_builder::select_avg()

select_avg([$select = ''[, $alias = '']]) Parameters: $select (string) – Field to compute the average of $alias (string) – Alias for the resulting value name Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a SELECT AVG(field) clause to a query.

CI_DB_query_builder::select()

select([$select = '*'[, $escape = NULL]]) Parameters: $select (string) – The SELECT portion of a query $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a SELECT clause to a query.

CI_DB_query_builder::reset_query()

reset_query() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Resets the current Query Builder state. Useful when you want to build a query that can be cancelled under certain conditions.

CI_DB_query_builder::replace()

replace([$table = ''[, $set = NULL]]) Parameters: $table (string) – Table name $set (array) – An associative array of field/value pairs Returns: TRUE on success, FALSE on failure Return type: bool Compiles and executes a REPLACE statement.

CI_DB_query_builder::or_where_not_in()

or_where_not_in([$key = NULL[, $values = NULL[, $escape = NULL]]]) Parameters: $key (string) – The field to search $values (array) – The values searched on $escape (bool) – Whether to escape values and identifiers Returns: DB_query_builder instance Return type: object Generates a WHERE field NOT IN(‘item’, ‘item’) SQL query, joined with ‘OR’ if appropriate.

CI_DB_query_builder::or_where_in()

or_where_in([$key = NULL[, $values = NULL[, $escape = NULL]]]) Parameters: $key (string) – The field to search $values (array) – The values searched on $escape (bool) – Whether to escape values and identifiers Returns: DB_query_builder instance Return type: object Generates a WHERE field IN(‘item’, ‘item’) SQL query, joined with ‘OR’ if appropriate.

CI_DB_query_builder::or_where()

or_where($key[, $value = NULL[, $escape = NULL]]) Parameters: $key (mixed) – Name of field to compare, or associative array $value (mixed) – If a single key, compared to this value $escape (bool) – Whether to escape values and identifiers Returns: DB_query_builder instance Return type: object Generates the WHERE portion of the query. Separates multiple calls with ‘OR’.

CI_DB_query_builder::or_not_like()

or_not_like($field[, $match = ''[, $side = 'both'[, $escape = NULL]]]) Parameters: $field (string) – Field name $match (string) – Text portion to match $side (string) – Which side of the expression to put the ‘%’ wildcard on $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a NOT LIKE clause to a query, separating multiple calls with OR.