mysqli_stmt_data_seek
stmt->data_seek
Seeks to an arbitray row in statement result set
Description
Procedural style:
voidmysqli_stmt_data_seek
mysqli_stmtstatement
intoffset
Object oriented style (method):
mysqli_stmt
voiddata_seek
intoffset
The mysqli_stmt_data_seek function seeks to an arbitrary result pointer
specified by the offset in the statement result set represented by
statement. The offset parameter must be between
zero and the total number of rows minus one (0..mysqli_stmt_num_rows - 1).
&reftitle.returnvalues;
Returns &null; on success or &false; on failure.
&reftitle.seealso;
mysqli_prepare.
&reftitle.examples;
Object oriented style
prepare($query)) {
/* execute query */
$stmt->execute();
/* bind result variables */
$stmt->bind_result($name, $code);
/* store result */
$stmt->store_result();
/* seek to row no. 400 */
$stmt->data_seek(399);
/* fetch values */
$stmt->fetch();
printf ("City: %s Countrycode: %s\n", $name, $code);
/* close statement */
$stmt->close();
}
/* close connection */
$mysqli->close();
?>
]]>
Procedural style
]]>
&example.outputs;