> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/connector-c-data-structures-and-definitions/mysql_stmt.md).

# MYSQL\_STMT

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

* 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()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_prepare.md) a prepared statement will also allocate resources on the server.
* Closing the connection with [mysql\_close()](/docs/connectors/mariadb-connector-c/api-functions/mysql_close.md) invalidates the statements but doesn't free resources on the client.

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