CI_DB_query_builder::where_in()

where_in([$key = NULL[, $values = NULL[, $escape = NULL]]]) Parameters: $key (string) – Name of field to examine $values (array) – Array of target values $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 ‘AND’ if appropriate.

CI_DB_query_builder::stop_cache()

stop_cache() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Stops the Query Builder cache.

CI_DB_query_builder::truncate()

truncate([$table = '']) Parameters: $table (string) – Table name Returns: TRUE on success, FALSE on failure Return type: bool Executes a TRUNCATE statement on a table. Note If the database platform in use doesn’t support TRUNCATE, a DELETE statement will be used instead.

CI_DB_query_builder::update()

update([$table = ''[, $set = NULL[, $where = NULL[, $limit = NULL]]]]) Parameters: $table (string) – Table name $set (array) – An associative array of field/value pairs $where (string) – The WHERE clause $limit (int) – The LIMIT clause Returns: TRUE on success, FALSE on failure Return type: bool Compiles and executes an UPDATE statement.

CI_DB_query_builder::start_cache()

start_cache() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Starts the Query Builder cache.

CI_DB_query_builder::set_insert_batch()

set_insert_batch($key[, $value = ''[, $escape = NULL]]) Parameters: $key (mixed) – Field name or an array of field/value pairs $value (string) – Field value, if $key is a single field $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds field/value pairs to be inserted in a table later via insert_batch().

CI_DB_query_builder::set_dbprefix()

set_dbprefix([$prefix = '']) Parameters: $prefix (string) – The new prefix to use Returns: The DB prefix in use Return type: string Sets the database prefix, without having to reconnect.

CI_DB_query_builder::set()

set($key[, $value = ''[, $escape = NULL]]) Parameters: $key (mixed) – Field name, or an array of field/value pairs $value (string) – Field value, if $key is a single field $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds field/value pairs to be passed later to insert(), update() or replace().

CI_DB_query_builder::set_update_batch()

set_update_batch($key[, $value = ''[, $escape = NULL]]) Parameters: $key (mixed) – Field name or an array of field/value pairs $value (string) – Field value, if $key is a single field $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds field/value pairs to be updated in a table later via update_batch().

CI_DB_query_builder::select_sum()

select_sum([$select = ''[, $alias = '']]) Parameters: $select (string) – Field to compute the sum 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 SUM(field) clause to a query.