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::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::like()

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 LIKE clause to a query, separating multiple calls with AND.

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