Name

msqlDataSeek

Synopsis

void msqlDataSeek ( m_result *result, int pos )

Sets the cursor that tells msqlFetchRow which row to fetch next. Setting a position of will move the cursor to the beginning of the data. Setting the cursor to a position past the last row of data will place the cursor at the end of the data.

Example

m_result *results;
m_row *row;

rows_returned = msqlQuery( dbh, "SELECT * FROM people" );
results = msqlStoreResult();
row = msqlFetchRow(results);
/* Now go back to the beginning */
msqlDataSeek(results, 0);

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.