maxdb_data_seek
result->data_seek
Adjusts the result pointer to an arbitary row in the result
Description
Procedural style:
boolmaxdb_data_seek
resourceresult
intoffset
Object oriented style (method):
result
bool
data_seek
intoffset
The maxdb_data_seek function seeks to an arbitrary result pointer
specified by the offset in the result set represented by
result. The offset parameter must be between
zero and the total number of rows minus one (0..maxdb_num_rows - 1).
Return values
&return.success;
See also
maxdb_store_result,
maxdb_fetch_row,
maxdb_num_rows.
Example
Object oriented style
query( $query)) {
/* seek to row no. 10 */
$result->data_seek(10);
/* fetch row */
$row = $result->fetch_row();
printf ("City: %s State: %s\n", $row[0], $row[1]);
/* free result set*/
$result->close();
}
/* close connection */
$maxdb->close();
?>
]]>
Procedural style
]]>
The above examples would produce the following output: