CI_DB_query_builder::update_batch()

update_batch($table[, $set = NULL[, $value = NULL[, $batch_size = 100]]]) Parameters: $table (string) – Table name $set (array) – Field name, or an associative array of field/value pairs $value (string) – Field value, if $set is a single field $batch_size (int) – Count of conditions to group in a single query Returns: Number of rows updated or FALSE on failure Return type: mixed Compiles and executes batch UPDATE statements. Note When more than $batch_size field/value pairs are

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::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::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::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_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::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::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.