Adjusts the result pointer to an arbitrary row in the result (original) (raw)
`<?php
/* Open a connection /
$link = mysqli_connect("localhost", "my_user", "my_password", "world");/ check connection */
if (!$link) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}$query = "SELECT Name, CountryCode FROM City ORDER BY Name";
if (
result=mysqliquery(result = mysqli_query(result=mysqliquery(link, $query)) {/* seek to row no. 400 /
mysqli_data_seek($result, 399);/ fetch row / row=mysqlifetchrow(row = mysqli_fetch_row(row=mysqlifetchrow(result);printf ("City: %s Countrycode: %s\n", row[0],row[0], row[0],row[1]);/ free result set*/
mysqli_free_result($result);
}/* close connection */
mysqli_close($link);
?> `
City: Benin City Countrycode: NGA