PHP 클래스 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.
저자: ExpressionEngine Dev Team
상속: extends CI_DB
파일 보기 프로젝트 열기: tastyigniter/tastyigniter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

보호된 프로퍼티들

프로퍼티 타입 설명
$_escape_char string Identifier escape character
$_mysqli MySQLi Has to be preserved without being assigned to $conn_id.

공개 메소드들

메소드 설명
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

보호된 메소드들

메소드 설명
_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

메소드 상세

_close() 보호된 메소드

Close DB Connection
protected _close ( ) : void
리턴 void

_db_set_charset() 보호된 메소드

Set client character set
protected _db_set_charset ( string $charset ) : boolean
$charset string
리턴 boolean

_escape_str() 보호된 메소드

Platform-dependant string escape
protected _escape_str ( $str ) : string
리턴 string

_execute() 보호된 메소드

Execute the query
protected _execute ( string $sql ) : mixed
$sql string an SQL query
리턴 mixed

_from_tables() 보호된 메소드

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

_list_columns() 보호된 메소드

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

_list_tables() 보호된 메소드

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
리턴 string

_prep_query() 보호된 메소드

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

_trans_begin() 보호된 메소드

Begin Transaction
protected _trans_begin ( ) : boolean
리턴 boolean

_trans_commit() 보호된 메소드

Commit Transaction
protected _trans_commit ( ) : boolean
리턴 boolean

_trans_rollback() 보호된 메소드

Rollback Transaction
protected _trans_rollback ( ) : boolean
리턴 boolean

affected_rows() 공개 메소드

Affected Rows
public affected_rows ( ) : integer
리턴 integer

db_connect() 공개 메소드

Database connection
public db_connect ( boolean $persistent = FALSE ) : object
$persistent boolean
리턴 object

db_select() 공개 메소드

Select the database
public db_select ( string $database = '' ) : boolean
$database string
리턴 boolean

error() 공개 메소드

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

field_data() 공개 메소드

Returns an object with field data
public field_data ( string $table ) : array
$table string
리턴 array

insert_id() 공개 메소드

Insert ID
public insert_id ( ) : integer
리턴 integer

reconnect() 공개 메소드

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
리턴 void

version() 공개 메소드

Database version number
public version ( ) : string
리턴 string

프로퍼티 상세

$_escape_char 보호되어 있는 프로퍼티

Identifier escape character
protected string $_escape_char
리턴 string

$_mysqli 보호되어 있는 프로퍼티

Has to be preserved without being assigned to $conn_id.
protected MySQLi $_mysqli
리턴 MySQLi

$compress 공개적으로 프로퍼티

Compression flag
public bool $compress
리턴 boolean

$dbdriver 공개적으로 프로퍼티

Database driver
public string $dbdriver
리턴 string

$delete_hack 공개적으로 프로퍼티

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
리턴 boolean

$stricton 공개적으로 프로퍼티

Whether we're running in strict SQL mode.
public bool $stricton
리턴 boolean