Name

mysql_row_tell —

Synopsis

MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *result)

Returns the value of the cursor as mysql_fetch_row reads the rows of a result set. The return value of this function can be used with mysql_row_seek to jump to a specific row in the result set. Values from the function are useful only if the result set was created with mysql_store_result (which contains all the data) and not mysql_use_result (which does not).

Example

/* results is a result set pointer created with mysql_store_result(  ) */
MYSQL_ROW_OFFSET saved_pos = mysql_row_tell(results);
/* I can now jump back to this row at any time using mysql_row_seek(  ) */

Get Managing & Using MySQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.