CI_DB_utility::optimize_database()

optimize_database() Returns: Array of optimization messages or FALSE on failure Return type: array Optimizes the database.

CI_DB_utility::list_databases()

list_databases() Returns: Array of database names found Return type: array Retrieve a list of all the database names.

CI_DB_utility::database_exists()

database_exists($database_name) Parameters: $database_name (string) – Database name Returns: TRUE if the database exists, FALSE otherwise Return type: bool Check for the existence of a database.

CI_DB_utility::csv_from_result()

csv_from_result($query[, $delim = ', '[, $newline = "n"[, $enclosure = '"']]]) Parameters: $query (object) – A database result object $delim (string) – The CSV field delimiter to use $newline (string) – The newline character to use $enclosure (string) – The enclosure delimiter to use Returns: The generated CSV file as a string Return type: string Translates a database result object into a CSV document.

CI_DB_utility::backup()

backup([$params = array()]) Parameters: $params (array) – An associative array of options Returns: raw/(g)zipped SQL query string Return type: string Perform a database backup, per user preferences.

CI_DB_utility

class CI_DB_utility backup([$params = array()]) Parameters: $params (array) – An associative array of options Returns: raw/(g)zipped SQL query string Return type: string Perform a database backup, per user preferences. database_exists($database_name) Parameters: $database_name (string) – Database name Returns: TRUE if the database exists, FALSE otherwise Return type: bool Check for the existence of a database. list_databases() Returns: Array of database names fou

CI_DB_result::unbuffered_row()

unbuffered_row([$type = 'object']) Parameters: $type (string) – Type of the requested result - array, object, or class name Returns: Next row from the result set or NULL if it doesn’t exist Return type: mixed Fetches the next result row and returns it in the requested form. Usage: see Result Rows.

CI_DB_result::set_row()

set_row($key[, $value = NULL]) Parameters: $key (mixed) – Column name or array of key/value pairs $value (mixed) – Value to assign to the column, $key is a single field name Return type: void Assigns a value to a particular column.

CI_DB_result::row_object()

row_object([$n = 0]) Parameters: $n (int) – Index of the query results row to be returned Returns: The requested row or NULL if it doesn’t exist Return type: stdClass Returns the requested result row as an object of type stdClass. Usage: see Result Rows.

CI_DB_result::row_array()

row_array([$n = 0]) Parameters: $n (int) – Index of the query results row to be returned Returns: The requested row or NULL if it doesn’t exist Return type: array Returns the requested result row as an associative array. Usage: see Result Rows.