# mysql\_stmt\_param\_count

## Syntax

```c
unsigned long mysql_stmt_param_count(MYSQL_STMT * stmt);
```

* `stmt` - a statement handle, which was previously allocated by [mysql\_stmt\_init()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_init).

## Description

Returns the number of parameter markers present in the prepared statement.

{% hint style="info" %}
This function will not deliver a valid result until [mysql\_stmt\_prepare()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_prepare) was called.
{% endhint %}

## See Also

* [mysql\_stmt\_prepare()](https://github.com/mariadb-corporation/docs-connectors/blob/test/mariadb-connector-c/mariadb-connectorc-api-prepared-statement-functions/mysql_stmt_prepare\(\)/README.md)
* [mysql\_stmt\_field\_count()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_field_count)

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