mysql\_stmt\_store\_result(3) MariaDB Connector/C mysql\_stmt\_store\_result(3)

## [Name](#Name)

mysql\_stmt\_store\_result - Transfers a result set from a prepared statement

## [Synopsis](#Synopsis)

```
#include <mysql.h>
int mysql_stmt_store_result(MYSQL_STMT * stmt);
    
```

## [Description](#Description)

You must call mysql\_stmt\_store\_result() for every query that successfully produces a result set only if you want to buffer the complete result set by the client, so that the subsequent [**mysql\_stmt\_fetch(3)**](/man/enterprise-packages/mariadb-12.2/mysql_stmt_fetch.3) call returns buffered data.

## [Parameter](#Parameter)

•

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

## [Return value](#Return_value)

Returns zero on success, nonzero if an error occurred. ## Notes * You can detect whether the statement produced a result set by checking the return value of [**mysql\_stmt\_field\_count(3)**](/man/enterprise-packages/mariadb-12.2/mysql_stmt_field_count.3) function.

## [See Also](#See_Also)

•

[**mysql\_stmt\_field\_count(3)**](/man/enterprise-packages/mariadb-12.2/mysql_stmt_field_count.3)

•

[**mysql\_stmt\_fetch(3)**](/man/enterprise-packages/mariadb-12.2/mysql_stmt_fetch.3)

Version 3.4

---

Document: mysql_stmt_store_result(3) from mariadb-12.2 12.2.2-r9 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
