mysql\_stmt\_num\_rows(3) MariaDB Connector/C mysql\_stmt\_num\_rows(3)

## [Name](#Name)

mysql\_stmt\_num\_rows - Returns number of rows in a prepared statement result set

## [Synopsis](#Synopsis)

```
#include <mysql.h>
unsigned long long mysql_stmt_num_rows(MYSQL_STMT * stmt);
    
```

## [Description](#Description)

Returns the number of rows in the result set. The use of mysql\_stmt\_num\_rows() depends on whether or not you used [**mysql\_stmt\_store\_result(3)**](/man/enterprise-packages/mariadb-10.11/mysql_stmt_store_result.3) to buffer the entire result set in the statement handle.

## [Parameter](#Parameter)

•

stmt - a statement handle, which was previously allocated by [**mysql\_stmt\_init(3)**](/man/enterprise-packages/mariadb-10.11/mysql_stmt_init.3).

## [Return value](#Return_value)

Number of rows in the result set

## [Notes](#Notes)

•

If you use [**mysql\_stmt\_store\_result(3)**](/man/enterprise-packages/mariadb-10.11/mysql_stmt_store_result.3), mysql\_stmt\_num\_rows() may be called immediately.

## [See Also](#See_Also)

•

[**mysql\_stmt\_store\_result(3)**](/man/enterprise-packages/mariadb-10.11/mysql_stmt_store_result.3)

Version 3.3

---

Document: mysql_stmt_num_rows(3) from mariadb-10.11 10.11.19-r5 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
