Must I call mysql_stmt_fetch() for all rows of a result set?
Posted by: Uli Klaasberg
Date: May 12, 2011 08:12AM

Hi,

is it neccessary to call mysql_stmt_fetch() for all rows of a *non_buffered* result set? Or can I safely exit the fetch loop before retrieving all rows?

For mysql_fetch_row() and mysql_use_result(), the manual says "you must execute mysql_fetch_row() until a NULL value is returned, otherwise, the unfetched rows are returned as part of the result set for your next query."

So how is this with prepared statements? I did a little test with a break inside a fetch loop, and all seems ok, but it would be good to have some more reliable informations.

MySQL Server is 5.1.40

Thanks for help,
Uli

Options: ReplyQuote


Subject
Views
Written By
Posted
Must I call mysql_stmt_fetch() for all rows of a result set?
3385
May 12, 2011 08:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.