mysqli_result 类

(PHP 5, PHP 7, PHP 8)

简介

代表从一个数据库查询中获取的结果集。

类摘要

classmysqli_resultimplementsIteratorAggregate {
publicreadonlyint$current_field;
publicreadonlyint$field_count;
publicreadonly?array$lengths;
publicreadonlyint|string$num_rows;
publicint$type;
public__construct(mysqli$mysql, int$result_mode = MYSQLI_STORE_RESULT)
publicdata_seek(int$offset): bool
publicfetch_all(int$mode = MYSQLI_NUM): array
publicfetch_object(string$class = "stdClass", array$constructor_args = []): object|null|false
publicfield_seek(int$index): true
publicfree(): void
publicclose(): void
publicfree_result(): void
}

属性

type

存储的是否为缓冲的结果,int 形式(分别是 MYSQLI_STORE_RESULTMYSQLI_USE_RESULT)。

更新日志

版本说明
8.0.0mysqli_result 现在实现 IteratorAggregate。之前实现的是 Traversable

目录

To Top