Name
mysql_field_seek
Synopsis
MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
Seeks to the given field of the current row of the result set. The
position set by this function is used when
mysql_fetch_field
is called. The
MYSQL_FIELD_OFFSET
value passed should be the
return value of a mysql_field_tell
call (or
another mysql_field_seek
). Using the value
will seek to the beginning of the row. The return value is the
position of the cursor before the function was called.
Example
MYSQL_FIELD field; /* Seek back to the beginning of the row */ old_pos = mysql_field_seek(results, 0); /* Fetch the first field of the row */ field = mysql_field_field(results); /* Go back to where you where */ mysql_field_seek(results, old_pos);
Get MySQL and mSQL 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.