Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 38.0Mb
PDF (A4) - 38.0Mb
PDF (RPM) - 37.4Mb
HTML Download (TGZ) - 10.3Mb
HTML Download (Zip) - 10.3Mb
HTML Download (RPM) - 8.9Mb
Man Pages (TGZ) - 216.7Kb
Man Pages (Zip) - 329.5Kb
Info (Gzip) - 3.5Mb
Info (Zip) - 3.5Mb
Excerpts from this Manual

27.8.11.6 mysql_stmt_close()

my_bool mysql_stmt_close(MYSQL_STMT *stmt)

Description

Closes the prepared statement. mysql_stmt_close() also deallocates the statement handler pointed to by stmt, which at that point becomes invalid and should no longer be used. For a failed mysql_stmt_close() call, do not call mysql_stmt_error(), or mysql_stmt_errno(), or mysql_stmt_sqlstate() to obtain error information because mysql_stmt_close() makes the statement handler invalid. Call mysql_error(), mysql_errno(), or mysql_sqlstate() instead.

If the current statement has pending or unread results, this function cancels them so that the next query can be executed.

Return Values

Zero for success. Nonzero if an error occurred.

Errors

User Comments
Sign Up Login You must be logged in to post a comment.