PHP mysqli_data_seek() Function

The mysqli_data_seek() function adjusts the result pointer to an arbitrary row in the result-set.

bool mysql_data_seek ( resource $result , int $row_number )

mysql_data_seek() moves the internal row pointer of the MySQL result associated with the specified result identifier to point to the specified row number. The next call to a MySQL fetch function, such as mysql_fetch_assoc(), would return that row.

Example -

ParameterDescription
resultThe result resource that is being evaluated. This result comes from a call to mysql_query().
row_numberThe desired row number of the new result pointer.

Returns TRUE on success or FALSE on failure.