# MYSQL\_STMT

The `MYSQL_STMT` structure is a handle for a prepared statement. The handle will be allocated by [mysql\_stmt\_init()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_init) and released by [mysql\_stmt\_close()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_close).

* All members of `MYSQL_STMT` are private and not intended for application use.
* Multiple statement handles can be opened within the same connection.
* After a successful call to [mysql\_stmt\_prepare()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_prepare) a prepared statement will also allocate resources on the server.
* Closing the connection with [mysql\_close()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_close) invalidates the statements but doesn't free resources on the client.

{% @marketo/form formId="4316" %}
