The mysqli_result class

(PHP 5, PHP 7, PHP 8)

Introduzione

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

Sommario della classe

class mysqli_result implements IteratorAggregate {
/* Proprietà */
public readonly int $current_field;
public readonly int $field_count;
public readonly ?array $lengths;
public readonly int|string $num_rows;
public int $type;
/* Metodi */
public __construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT)
public data_seek(int $offset): bool
public fetch_all(int $mode = MYSQLI_NUM): array
public fetch_column(int $column = 0): null|int|float|string|false
public fetch_object(string $class = "stdClass", array $constructor_args = []): object|null|false
public field_seek(int $index): true
public free(): void
public close(): void
public free_result(): void
}

Proprietà

type

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

Log delle modifiche

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

Indice dei contenuti