(PHP 5, PHP 7, PHP 8)
Represents the result set obtained from a query against the database.
public data_seek(int $offset): bool
public fetch_all(int $mode = MYSQLI_NUM): array
public fetch_array(int $mode = MYSQLI_BOTH): array|null|false
public fetch_assoc(): array|null|false
public fetch_column(int $column = 0): null|int|float|string|false
public fetch_field(): object|false
public fetch_field_direct(int $index): object|false
public fetch_fields(): array
public fetch_object(string $class = "stdClass", array $constructor_args = []): object|null|false
public fetch_row(): array|null|false
public field_seek(int $index): true
public free(): void
public close(): void
public free_result(): void
public getIterator(): Iterator}
Stores whether the result is buffered or unbuffered as an int (MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT, respectively).
| Version | Description |
|---|---|
| 8.0.0 | mysqli_result implements IteratorAggregate now. Previously, Traversable was implemented instead. |
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.mysqli-result.php