This function takes the result structure we obtained from store result, and retrieves a single row from it, returning the data in a row structure that it allocates for you. When there is no more data, or an error occurs, NULL is returned. We will come back to processing the data in this row structure later.
Thisfunction allows you to jump about in the result set, setting the row that will be returned by the next fetch row operation. The offset value is a row number, and must be in the range zero to one less than the number of rows in the result set. Passing zero will cause the first row to be returned on the next call to mysql_fetch_row.
This function returns an offset value, indicating the current position in the result set. It is not a row number, and you can't use it with mysql_data_seek. However you can use it with:
which moves the current position in the result set, and returns the previous position.
This pair of functions can sometimes be useful for jumping between known points in the result set. Be careful never to mix up the offset value used by row tell and row seek with the row number used by data_seek. These are not interchangeable, and your results will not be what you were hoping for.
There is one last function we need to know before we can use these new functions in anger, and that is mysql_free_result.
When you've finished with a result set you must always call this function, to allow the MySQL library to tidy up the objects it has allocated.