Method |
Description |
|
__construct ( &$conf ) |
|
|
__destruct ( ) |
|
|
connect ( ) |
根据配置文件连接 |
|
connect_master ( ) |
连接写服务器 |
|
connect_slave ( ) |
连接从服务器,如果有多台,则随机挑选一台,如果为空,则与主服务器一致。 |
|
count ( $table, $cond = [] ) |
SELECT TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '$table'; |
|
error ( $errno, $errstr = '' ) |
设置错误。 |
|
exec ( $sql ) |
|
|
find ( $sql, $key = NULL ) |
|
|
find_one ( $sql ) |
|
|
last_insert_id ( ) |
|
|
maxid ( $table, $field ) |
|
|
query ( $sql ) |
|
|
real_connect ( $host, $user, $password, $name, $charset = '', $engine = '' ) |
|
|
version ( ) |
|
|