PHP Class db_pdo_sqlite

Inheritance: implements db_interface
Exibir arquivo Open project: xiuno/xiunobbs Class Usage Examples

Public Properties

Property Type Description
$conf
$errno 最后一次使用的连接
$errstr
$link 读连接
$rlink 写连接
$wlink 配置,可以支持主从

Public Methods

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 ( )

Method Details

__construct() public method

public __construct ( &$conf )

__destruct() public method

public __destruct ( )

connect() public method

根据配置文件连接
public connect ( )

connect_master() public method

连接写服务器
public connect_master ( )

connect_slave() public method

连接从服务器,如果有多台,则随机挑选一台,如果为空,则与主服务器一致。
public connect_slave ( )

count() public method

public count ( $table, $cond = [] )

error() public method

设置错误。
public error ( $errno, $errstr = '' )

exec() public method

public exec ( $sql )

find() public method

public find ( $sql, $key = NULL )

find_one() public method

public find_one ( $sql )

last_insert_id() public method

public last_insert_id ( )

maxid() public method

public maxid ( $table, $field )

query() public method

public query ( $sql )

real_connect() public method

public real_connect ( $host, $user, $password, $name, $charset = '', $engine = '' )

version() public method

public version ( )

Property Details

$conf public_oe property

public $conf

$errno public_oe property

最后一次使用的连接
public $errno

$errstr public_oe property

public $errstr