|
mysqli_result::data_seekmysqli_data_seekAdjusts the result pointer to an arbitrary row in the result DescriptionObject-oriented style
public bool mysqli_result::data_seek(int
$offset )Procedural style bool mysqli_data_seek(mysqli_result
$result , int $offset )
The mysqli_data_seek function seeks to an arbitrary
result pointer specified by the Parameters
Return Values
Returns ExamplesExample #1 mysqli::data_seek example Object-oriented style
Procedural style
The above examples will output: City: Benin City Countrycode: NGA Example #2 Adjusting the result pointer when iterating This function can be useful when iterating over the result set to impose a custom order or rewind the result set when iterating multiple times.
The above examples will output: City: Acmbaro Countrycode: MEX City: Abuja Countrycode: NGA City: Abu Dhabi Countrycode: ARE City: Abottabad Countrycode: PAK City: Abottabad Countrycode: PAK City: Abu Dhabi Countrycode: ARE City: Abuja Countrycode: NGA City: Acmbaro Countrycode: MEX Notes
See Also
|