CI_DB_result::first_row()

first_row([$type = 'object']) Parameters: $type (string) – Type of the requested result - array, object, or class name Returns: First row of result set, or NULL if it doesn’t exist Return type: mixed Returns the first row from the result set.

CI_DB_result::custom_result_object()

custom_result_object($class_name) Parameters: $class_name (string) – Class name for the resulting rows Returns: Array containing the fetched rows Return type: array Returns the query results as an array of rows, where each row is an instance of the specified class.

CI_DB_result::free_result()

free_result() Return type: void Frees a result set. Usage: see Result Helper Methods.

CI_DB_result::field_data()

field_data() Returns: Array containing field meta-data Return type: array Generates an array of stdClass objects containing field meta-data.

CI_DB_result::data_seek()

data_seek([$n = 0]) Parameters: $n (int) – Index of the results row to be returned next Returns: TRUE on success, FALSE on failure Return type: bool Moves the internal results row pointer to the desired offset. Usage: see Result Helper Methods.

CI_DB_result

class CI_DB_result result([$type = 'object']) Parameters: $type (string) – Type of requested results - array, object, or class name Returns: Array containing the fetched rows Return type: array A wrapper for the result_array(), result_object() and custom_result_object() methods. Usage: see Result Arrays. result_array() Returns: Array containing the fetched rows Return type: array Returns the query results as an array of rows, where each row is itself an associative array. Usa

CI_DB_result::custom_row_object()

custom_row_object($n, $type) Parameters: $n (int) – Index of the results row to return $class_name (string) – Class name for the resulting row Returns: The requested row or NULL if it doesn’t exist Return type: $type Returns the requested result row as an instance of the requested class.

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

where_not_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 NOT IN(‘item’, ‘item’) SQL query, joined with ‘AND’ if appropriate.

CI_DB_query_builder::where()

where($key[, $value = NULL[, $escape = NULL]]) Parameters: $key (mixed) – Name of field to compare, or associative array $value (mixed) – If a single key, compared to this value $escape (bool) – Whether to escape values and identifiers Returns: DB_query_builder instance Return type: object Generates the WHERE portion of the query. Separates multiple calls with ‘AND’.