PDOStatement 类

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

简介

代表一条预处理语句,并在该语句被执行后代表一个相关的结果集。

类摘要

classPDOStatement {
publicbindColumn(
    string|int$column,
    mixed&$var,
    int$type = PDO::PARAM_STR,
    int$maxLength = 0,
    mixed$driverOptions = null
): bool
publicbindParam(
    string|int$param,
    mixed&$var,
    int$type = PDO::PARAM_STR,
    int$maxLength = 0,
    mixed$driverOptions = null
): bool
publicbindValue(string|int$param, mixed$value, int$type = PDO::PARAM_STR): bool
publiccloseCursor(): bool
publiccolumnCount(): int
publicerrorInfo(): array
publicexecute(?array$params = null): bool
publicfetch(int$mode = PDO::FETCH_DEFAULT, int$cursorOrientation = PDO::FETCH_ORI_NEXT, int$cursorOffset = 0): mixed
publicfetchAll(int$mode = PDO::FETCH_DEFAULT): array
publicfetchAll(int$mode = PDO::FETCH_COLUMN, int$column): array
publicfetchAll(int$mode = PDO::FETCH_CLASS, string$class, ?array$constructorArgs): array
publicfetchAll(int$mode = PDO::FETCH_FUNC, callable$callback): array
publicfetchColumn(int$column = 0): mixed
publicfetchObject(?string$class = "stdClass", array$constructorArgs = []): object|false
publicgetAttribute(int$name): mixed
publicgetColumnMeta(int$column): array|false
publicnextRowset(): bool
publicrowCount(): int
publicsetAttribute(int$attribute, mixed$value): bool
publicsetFetchMode(int$mode): bool
publicsetFetchMode(int$mode = PDO::FETCH_COLUMN, int$colno): bool
publicsetFetchMode(int$mode = PDO::FETCH_CLASS, string$class, ?array$constructorArgs = null): bool
publicsetFetchMode(int$mode = PDO::FETCH_INTO, object$object): bool
}

属性

queryString

所用的查询字符串

更新日志

版本说明
8.0.0 现在 PDOStatement 的实现不是 Traversable 而是 IteratorAggregate

目录

To Top