The mysqli_result class

(PHP 5, PHP 7, PHP 8)

Introduction

Represents the result set obtained from a query against the database.

Class synopsis

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
}

Properties

type

Stores whether the result is buffered or unbuffered as an int (MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT, respectively).

Changelog

VersionDescription
8.0.0mysqli_result implements IteratorAggregate now. Previously, Traversable was implemented instead.

Table of Contents

To Top