I needed to "peek" at the next record in order to see if fetching it would go too far. So I want to do a fetch, followed by seek(-1).
I could find no function to move the internal row pointer relative to it's current position, or to retrieve it as a row number as required by mysql_data_seek(). This limits the function's usefulness to resetting the row to 0, unless you track the row number yourself.
If you use a While loop to step through the results, you can increment a tracking index at the bottom of the loop. But be sure never to use Continue; which would bypass your index. And document this restriction for the person who needs to maintain your code. It's probably better to use a For loop, which makes the index explicit.
In either case be sure to range check the index when you manipulate it. E.G. When I "peek" at the next record I must check for index>=count (end of data). Or if I decrement the index, make sure it does not go negative. Again, document why you are coding it this way, so the next programmer doesn't "correct" the inelegant code.