Property | Type | Description | |
---|---|---|---|
$conf | |||
$errno | 最后一次使用的连接 | ||
$errstr | |||
$link | 读连接 | ||
$rlink | 写连接 | ||
$wlink | 配置,可以支持主从 |
Method | Description | |
---|---|---|
__construct ( &$conf ) | ||
__destruct ( ) | ||
connect ( ) | 根据配置文件连接 | |
connect_master ( ) | 连接写服务器 | |
connect_slave ( ) | 连接从服务器,如果有多台,则随机挑选一台,如果为空,则与主服务器一致。 | |
count ( $table, $cond = [] ) | ||
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 ( ) |
public real_connect ( $host, $user, $password, $name, $charset = '', $engine = '' ) |