CI_DB_query_builder::get_compiled_insert()

get_compiled_insert([$table = ''[, $reset = TRUE]]) Parameters: $table (string) – Table name $reset (bool) – Whether to reset the current QB values or not Returns: The compiled SQL statement as a string Return type: string Compiles an INSERT statement and returns it as a string.

CI_DB_query_builder::get_compiled_delete()

get_compiled_delete([$table = ''[, $reset = TRUE]]) Parameters: $table (string) – Table name $reset (bool) – Whether to reset the current QB values or not Returns: The compiled SQL statement as a string Return type: string Compiles a DELETE statement and returns it as a string.

CI_DB_query_builder::get()

get([$table = ''[, $limit = NULL[, $offset = NULL]]]) Parameters: $table (string) – The table to query $limit (int) – The LIMIT clause $offset (int) – The OFFSET clause Returns: CI_DB_result instance (method chaining) Return type: CI_DB_result Compiles and runs SELECT statement based on the already called Query Builder methods.

CI_DB_query_builder::from()

from($from) Parameters: $from (mixed) – Table name(s); string or array Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Specifies the FROM clause of a query.

CI_DB_query_builder::flush_cache()

flush_cache() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Empties the Query Builder cache.

CI_DB_query_builder::empty_table()

empty_table([$table = '']) Parameters: $table (string) – Table name Returns: TRUE on success, FALSE on failure Return type: bool Deletes all records from a table via a DELETE statement.

CI_DB_query_builder::distinct()

distinct([$val = TRUE]) Parameters: $val (bool) – Desired value of the “distinct” flag Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Sets a flag which tells the query builder to add a DISTINCT clause to the SELECT portion of the query.

CI_DB_query_builder::delete()

delete([$table = ''[, $where = ''[, $limit = NULL[, $reset_data = TRUE]]]]) Parameters: $table (mixed) – The table(s) to delete from; string or array $where (string) – The WHERE clause $limit (int) – The LIMIT clause $reset_data (bool) – TRUE to reset the query “write” clause Returns: CI_DB_query_builder instance (method chaining) or FALSE on failure Return type: mixed Compiles and executes a DELETE query.

CI_DB_query_builder::dbprefix()

dbprefix([$table = '']) Parameters: $table (string) – The table name to prefix Returns: The prefixed table name Return type: string Prepends a database prefix, if one exists in configuration.

CI_DB_query_builder::count_all_results()

count_all_results([$table = ''[, $reset = TRUE]]) Parameters: $table (string) – Table name $reset (bool) – Whether to reset values for SELECTs Returns: Number of rows in the query result Return type: int Generates a platform-specific query string that counts all records returned by an Query Builder query.