PHP Class CI_DB_mysqli_driver, TastyIgniter

Note: _DB is an extender class that the app controller creates dynamically based on whether the active record class is being used or not.
Author: ExpressionEngine Dev Team
Inheritance: extends CI_DB
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$compress boolean Compression flag
$dbdriver string Database driver
$delete_hack boolean Whether to use the MySQL "delete hack" which allows the number of affected rows to be shown. Uses a preg_replace when enabled, adding a bit more processing to all queries.
$stricton boolean Whether we're running in strict SQL mode.

Protected Properties

Свойство Type Description
$_escape_char string Identifier escape character
$_mysqli MySQLi Has to be preserved without being assigned to $conn_id.

Méthodes publiques

Méthode Description
affected_rows ( ) : integer Affected Rows
db_connect ( boolean $persistent = FALSE ) : object Database connection
db_select ( string $database = '' ) : boolean Select the database
error ( ) : array Error
field_data ( string $table ) : array Returns an object with field data
insert_id ( ) : integer Insert ID
reconnect ( ) : void Reconnect
version ( ) : string Database version number

Méthodes protégées

Méthode Description
_close ( ) : void Close DB Connection
_db_set_charset ( string $charset ) : boolean Set client character set
_escape_str ( $str ) : string Platform-dependant string escape
_execute ( string $sql ) : mixed Execute the query
_from_tables ( ) : string FROM tables
_list_columns ( string $table = '' ) : string Show column query
_list_tables ( boolean $prefix_limit = FALSE ) : string List table query
_prep_query ( string $sql ) : string Prep the query
_trans_begin ( ) : boolean Begin Transaction
_trans_commit ( ) : boolean Commit Transaction
_trans_rollback ( ) : boolean Rollback Transaction

Method Details

_close() protected méthode

Close DB Connection
protected _close ( ) : void
Résultat void

_db_set_charset() protected méthode

Set client character set
protected _db_set_charset ( string $charset ) : boolean
$charset string
Résultat boolean

_escape_str() protected méthode

Platform-dependant string escape
protected _escape_str ( $str ) : string
Résultat string

_execute() protected méthode

Execute the query
protected _execute ( string $sql ) : mixed
$sql string an SQL query
Résultat mixed

_from_tables() protected méthode

Groups tables in FROM clauses if needed, so there is no confusion about operator precedence.
protected _from_tables ( ) : string
Résultat string

_list_columns() protected méthode

Generates a platform-specific query string so that the column names can be fetched
protected _list_columns ( string $table = '' ) : string
$table string
Résultat string

_list_tables() protected méthode

Generates a platform-specific query string so that the table names can be fetched
protected _list_tables ( boolean $prefix_limit = FALSE ) : string
$prefix_limit boolean
Résultat string

_prep_query() protected méthode

If needed, each database adapter can prep the query string
protected _prep_query ( string $sql ) : string
$sql string an SQL query
Résultat string

_trans_begin() protected méthode

Begin Transaction
protected _trans_begin ( ) : boolean
Résultat boolean

_trans_commit() protected méthode

Commit Transaction
protected _trans_commit ( ) : boolean
Résultat boolean

_trans_rollback() protected méthode

Rollback Transaction
protected _trans_rollback ( ) : boolean
Résultat boolean

affected_rows() public méthode

Affected Rows
public affected_rows ( ) : integer
Résultat integer

db_connect() public méthode

Database connection
public db_connect ( boolean $persistent = FALSE ) : object
$persistent boolean
Résultat object

db_select() public méthode

Select the database
public db_select ( string $database = '' ) : boolean
$database string
Résultat boolean

error() public méthode

Returns an array containing code and message of the last database error that has occurred.
public error ( ) : array
Résultat array

field_data() public méthode

Returns an object with field data
public field_data ( string $table ) : array
$table string
Résultat array

insert_id() public méthode

Insert ID
public insert_id ( ) : integer
Résultat integer

reconnect() public méthode

Keep / reestablish the db connection if no queries have been sent for a length of time exceeding the server's idle timeout
public reconnect ( ) : void
Résultat void

version() public méthode

Database version number
public version ( ) : string
Résultat string

Property Details

$_escape_char protected_oe property

Identifier escape character
protected string $_escape_char
Résultat string

$_mysqli protected_oe property

Has to be preserved without being assigned to $conn_id.
protected MySQLi $_mysqli
Résultat MySQLi

$compress public_oe property

Compression flag
public bool $compress
Résultat boolean

$dbdriver public_oe property

Database driver
public string $dbdriver
Résultat string

$delete_hack public_oe property

Whether to use the MySQL "delete hack" which allows the number of affected rows to be shown. Uses a preg_replace when enabled, adding a bit more processing to all queries.
public bool $delete_hack
Résultat boolean

$stricton public_oe property

Whether we're running in strict SQL mode.
public bool $stricton
Résultat boolean