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 found Return type: array Retrieve a list of all the database names.
-
optimize_database()
-
Returns: Array of optimization messages or FALSE on failure Return type: array Optimizes the database.
-
optimize_table($table_name)
-
Parameters: - $table_name (string) – Name of the table to optimize
Returns: Array of optimization messages or FALSE on failure
Return type: array
Optimizes a database table.
-
repair_table($table_name)
-
Parameters: - $table_name (string) – Name of the table to repair
Returns: Array of repair messages or FALSE on failure
Return type: array
Repairs a database table.
-
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.
-
xml_from_result($query[, $params = array()])
-
Parameters: - $query (object) – A database result object
- $params (array) – An associative array of preferences
Returns: The generated XML document as a string
Return type: string
Translates a database result object into an XML document.
Please login to continue.