mysql_stmt_close
mysql_stmt_close deallocates a prepared statement handle and cancels any pending results, freeing server and client resources associated with the statement.
Syntax
my_bool mysql_stmt_close(MYSQL_STMT * stmt);Parameter
stmt- a statement handle, which was previously allocated by mysql_stmt_init().
Description
Closes a prepared statement and deallocates the statement handle. If the current statement has pending or unread results, this function cancels them so that the next query can be executed.
Return Value
Returns zero on success, nonzero on error (when communicating with the server). The statement is deallocated, regardless of the error.
See Also
This page is: Copyright © 2026 MariaDB. All rights reserved.
Last updated
Was this helpful?

