Php/docs/class.pdo

来自菜鸟教程
跳转至:导航、​搜索

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0)

简介

代表 PHP 和数据库服务之间的一个连接


类摘要


PDO {

__construct ( string $dsn [, string $username [, string $password [, array $driver_options ]]] )

beginTransaction ( ) : bool

commit ( ) : bool

errorCode ( ) : mixed

public errorInfo ( ) : array

exec ( string $statement ) : int

getAttribute ( int $attribute ) : mixed

static getAvailableDrivers ( ) : array

inTransaction ( ) : bool

lastInsertId ([ string $name = null ] ) : string

public prepare ( string $statement [, array $driver_options = array() ] ) : PDOStatement

public query ( string $statement ) : PDOStatement

public quote ( string $string [, int $parameter_type = PDO::PARAM_STR ] ) : string

rollBack ( ) : bool

setAttribute ( int $attribute , mixed $value ) : bool

}

Table of Contents