The syntax to count rows is slightly different across different
database engines, so this string appears in each driver and is
used for the count_all() and count_all_results() functions.
Type
$_random_keyword
$_random_keyword :
Type
Methods
db_connect()
db_connect() : resource
Non-persistent database connection
Returns
resource
db_pconnect()
db_pconnect() : resource
Persistent database connection
Returns
resource
reconnect()
reconnect() : void
Reconnect
Keep / reestablish the db connection if no queries have been
sent for a length of time exceeding the server's idle timeout
db_select()
db_select() : resource
Select the database
Returns
resource
db_set_charset()
db_set_charset( $charset, $collation) : resource
Set client character set
Parameters
$charset
$collation
Returns
resource
_version()
_version() : string
Version number query string
Returns
string
_execute()
_execute( $sql) : resource
Execute the query
Parameters
$sql
Returns
resource
_prep_query()
_prep_query( $sql) : string
Prep the query
If needed, each database adapter can prep the query string
Parameters
$sql
Returns
string
trans_begin()
trans_begin( $test_mode = FALSE) : boolean
Begin Transaction
Parameters
$test_mode
Returns
boolean
trans_commit()
trans_commit() : boolean
Commit Transaction
Returns
boolean
trans_rollback()
trans_rollback() : boolean
Rollback Transaction
Returns
boolean
escape_str()
escape_str( $str, $like = FALSE) : string
Escape String
Parameters
$str
$like
Returns
string
affected_rows()
affected_rows() : integer
Affected Rows
Returns
integer
insert_id()
insert_id() : integer
Insert ID
Returns
integer
count_all()
count_all( $table = '') : string
"Count All" query
Generates a platform-specific query string that counts all records in
the specified database
Parameters
$table
Returns
string
_list_tables()
_list_tables( $prefix_limit = FALSE) : string
List table query
Generates a platform-specific query string so that the table names can be fetched
Parameters
$prefix_limit
Returns
string
_list_columns()
_list_columns( $table = '') : string
Show column query
Generates a platform-specific query string so that the column names can be fetched
Parameters
$table
Returns
string
_field_data()
_field_data( $table) : object
Field data query
Generates a platform-specific query so that the column data can be retrieved
Parameters
$table
Returns
object
_error_message()
_error_message() : string
The error message string
Returns
string
_error_number()
_error_number() : integer
The error message number
Returns
integer
_escape_identifiers()
_escape_identifiers( $item) : string
Escape the SQL Identifiers
This function escapes column and table names
Parameters
$item
Returns
string
_from_tables()
_from_tables( $tables) : \type
From Tables
This function implicitly groups FROM tables so there is no confusion
about operator precedence in harmony with SQL standards
Parameters
$tables
Returns
\type
_insert()
_insert( $table, $keys, $values) : string
Insert statement
Generates a platform-specific insert string from the supplied data
Generates a platform-specific update string from the supplied data
Parameters
$table
$values
$where
$orderby
$limit
Returns
string
_truncate()
_truncate( $table) : string
Truncate statement
Generates a platform-specific truncate string from the supplied data
If the database does not support the truncate() command
This function maps to "DELETE FROM table"