PHP Class Swoole\Database\CLMySQL

Author: Chunhao.Yan
Inheritance: implements Swoole\IDatabase
ファイルを表示 Open project: matyhtf/swoole_framework

Public Properties

Property Type Description
$config
$conn
$debug
$error

Public Methods

Method Description
__construct ( $db_config )
affected_rows ( ) : integer 获取上一次操作影响的行数
close ( ) 关闭连接
connect ( ) 连接数据库
errno ( ) : integer 获取错误码
errorMessage ( $sql )
getAffectedRows ( ) : integer 获取受影响的行数
lastInsertId ( ) : integer 返回上一个Insert语句的自增主键ID
ping ( )
query ( string $sql ) : Swoole\Database\MySQLRecord | false 执行一个SQL语句
quote ( $value )

Protected Methods

Method Description
checkConnection ( ) 检查数据库连接,是否有效,无效则重新建立

Method Details

__construct() public method

public __construct ( $db_config )

affected_rows() public method

获取上一次操作影响的行数
public affected_rows ( ) : integer
return integer

checkConnection() protected method

检查数据库连接,是否有效,无效则重新建立
protected checkConnection ( )

close() public method

关闭连接
public close ( )

connect() public method

连接数据库
public connect ( )

errno() public method

获取错误码
public errno ( ) : integer
return integer

errorMessage() public method

public errorMessage ( $sql )

getAffectedRows() public method

获取受影响的行数
public getAffectedRows ( ) : integer
return integer

lastInsertId() public method

返回上一个Insert语句的自增主键ID
public lastInsertId ( ) : integer
return integer

ping() public method

public ping ( )

query() public method

执行一个SQL语句
public query ( string $sql ) : Swoole\Database\MySQLRecord | false
$sql string 执行的SQL语句
return Swoole\Database\MySQLRecord | false | false

quote() public method

public quote ( $value )

Property Details

$config public_oe property

public $config

$conn public_oe property

public $conn

$debug public_oe property

public $debug

$error public_oe property

public $error