MySQL Forums
Forum List  »  Newbie

mysql-store-result() man page, test for error
Posted by: Doru Georgescu
Date: May 05, 2012 06:40AM

On this page: is written: "mysql_store_result() also returns a null pointer if reading of the result set failed. You can check whether an error occurred by checking whether mysql_error() returns a nonempty string, mysql_errno() returns nonzero, or mysql_field_count() returns zero."

I believe that it should read "mysql_field_count() returns nonzero" instead of "mysql_field_count() returns zero." See also, where it is clearly stated: "You can always check whether the statement (mysql_store_result() - my note, doru) should have produced a nonempty result by calling mysql_field_count(). If mysql_field_count() returns zero, the result is empty and the last query was a statement that does not return values (for example, an INSERT or a DELETE). If mysql_field_count() returns a nonzero value, the statement should have produced a nonempty result."

Please help me understand.

Also, should this not be fully explained on the page?

Edited 1 time(s). Last edit at 05/05/2012 06:59AM by Doru Georgescu.

Options: ReplyQuote

Written By
mysql-store-result() man page, test for error
May 05, 2012 06:40AM

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.