PDO 类

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

简介

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

类摘要

class PDO {
__construct(
    string $dsn,
    string $username = ?,
    string $password = ?,
    array $driver_options = ?
)
commit(): bool
public errorInfo(): array
exec(string $statement): int
getAttribute(int $attribute): mixed
static getAvailableDrivers(): array
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
}

目录