CI_DB_query_builder::join()

join($table, $cond[, $type = ''[, $escape = NULL]]) Parameters: $table (string) – Table name to join $cond (string) – The JOIN ON condition $type (string) – The JOIN type $escape (bool) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a JOIN clause to a query.

CI_DB_query_builder::insert_batch()

insert_batch($table[, $set = NULL[, $escape = NULL[, $batch_size = 100]]]) Parameters: $table (string) – Table name $set (array) – Data to insert $escape (bool) – Whether to escape values and identifiers $batch_size (int) – Count of rows to insert at once Returns: Number of rows inserted or FALSE on failure Return type: mixed Compiles and executes batch INSERT statements. Note When more than $batch_size rows are provided, multiple INSERT queries will be executed, each trying to

CI_DB_query_builder::insert()

insert([$table = ''[, $set = NULL[, $escape = NULL]]]) Parameters: $table (string) – Table name $set (array) – An associative array of field/value pairs $escape (bool) – Whether to escape values and identifiers Returns: TRUE on success, FALSE on failure Return type: bool Compiles and executes an INSERT statement.

CI_DB_query_builder::having()

having($key[, $value = NULL[, $escape = NULL]]) Parameters: $key (mixed) – Identifier (string) or associative array of field/value pairs $value (string) – Value sought if $key is an identifier $escape (string) – Whether to escape values and identifiers Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a HAVING clause to a query, separating multiple calls with AND.

CI_DB_query_builder::group_start()

group_start() Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Starts a group expression, using ANDs for the conditions inside it.

CI_DB_query_builder::group_end()

group_end() Returns: DB_query_builder instance Return type: object Ends a group expression.

CI_DB_query_builder::group_by()

group_by($by[, $escape = NULL]) Parameters: $by (mixed) – Field(s) to group by; string or array Returns: CI_DB_query_builder instance (method chaining) Return type: CI_DB_query_builder Adds a GROUP BY clause to a query.

CI_DB_query_builder::get_where()

get_where([$table = ''[, $where = NULL[, $limit = NULL[, $offset = NULL]]]]) Parameters: $table (mixed) – The table(s) to fetch data from; string or array $where (string) – The WHERE clause $limit (int) – The LIMIT clause $offset (int) – The OFFSET clause Returns: CI_DB_result instance (method chaining) Return type: CI_DB_result Same as get(), but also allows the WHERE to be added directly.

CI_DB_query_builder::get_compiled_update()

get_compiled_update([$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 UPDATE statement and returns it as a string.

CI_DB_query_builder::get_compiled_select()

get_compiled_select([$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 SELECT statement and returns it as a string.