CI_DB_driver::is_write_type()

is_write_type($sql) Parameters: $sql (string) – The SQL statement Returns: TRUE if the SQL statement is of “write type”, FALSE if not Return type: bool Determines if a query is of a “write” type (such as INSERT, UPDATE, DELETE) or “read” type (i.e. SELECT).

CI_DB_driver::initialize()

initialize() Returns: TRUE on success, FALSE on failure Return type: bool Initialize database settings, establish a connection to the database.

CI_DB_driver::insert_string()

insert_string($table, $data) Parameters: $table (string) – The target table $data (array) – An associative array of key/value pairs Returns: The SQL INSERT statement, as a string Return type: string Generate an INSERT statement string.

CI_DB_driver::escape()

escape($str) Parameters: $str (mixed) – The value to escape, or an array of multiple ones Returns: The escaped value(s) Return type: mixed Escapes input data based on type, including boolean and NULLs.

CI_DB_driver::field_data()

field_data($table) Parameters: $table (string) – The table name Returns: Array of field data items or FALSE on failure Return type: array Gets a list containing field data about a table.

CI_DB_driver::escape_identifiers()

escape_identifiers($item) Parameters: $item (mixed) – The item or array of items to escape Returns: The input item(s), escaped Return type: mixed Escape SQL identifiers, such as column, table and names.

CI_DB_driver::escape_str()

escape_str($str[, $like = FALSE]) Parameters: $str (mixed) – A string value or array of multiple ones $like (bool) – Whether or not the string will be used in a LIKE condition Returns: The escaped string(s) Return type: mixed Escapes string values. Warning The returned strings do NOT include quotes around them.

CI_DB_driver::escape_like_str()

escape_like_str($str) Parameters: $str (mixed) – A string value or array of multiple ones Returns: The escaped string(s) Return type: mixed Escape LIKE strings. Similar to escape_str(), but will also escape the % and _ wildcard characters, so that they don’t cause false-positives in LIKE conditions. Important The escape_like_str() method uses ‘!’ (exclamation mark) to escape special characters for LIKE conditions. Because this method escapes partial strings that you would wrap in q

CI_DB_driver::field_exists()

field_exists($field_name, $table_name) Parameters: $table_name (string) – The table name $field_name (string) – The field name Returns: TRUE if that field exists in that table, FALSE if not Return type: bool Determine if a particular field exists.

CI_DB_driver::db_set_charset()

db_set_charset($charset) Parameters: $charset (string) – Character set name Returns: TRUE on success, FALSE on failure Return type: bool Set client character set.