W3cubDocs

/PHP

The mysqli_result class

Introduction

(PHP 5, PHP 7)

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

Changelog

Changelog
Version Description
5.4.0 Iterator support was added, as mysqli_result now implements Traversable.

Class synopsis

mysqli_result implements Traversable {
/* Properties */
array $lengths;
int $num_rows;
/* Methods */
public data_seek ( int $offset ) : bool
public fetch_all ([ int $resulttype = MYSQLI_NUM ] ) : mixed
public fetch_array ([ int $resulttype = MYSQLI_BOTH ] ) : mixed
public fetch_assoc ( ) : array
public fetch_field_direct ( int $fieldnr ) : object
public fetch_field ( ) : object
public fetch_fields ( ) : array
public fetch_object ([ string $class_name = "stdClass" [, array $params ]] ) : object
public fetch_row ( ) : mixed
public field_seek ( int $fieldnr ) : bool
public free ( ) : void
public close ( ) : void
public free_result ( ) : void
}

Table of Contents

© 1997–2020 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