mysql\_use\_result(3) MariaDB Connector/C mysql\_use\_result(3)

## [Name](#Name)

mysql\_use\_result - returns an unbuffered result set

## [Synopsis](#Synopsis)

```
#include <nysql.h>
MYSQL_RES * mysql_use_result(MYSQL * mysql);
    
```

## [Description](#Description)

Used to initiate the retrieval of a result set from the last query executed using the mysql\_real\_query() function on the database connection. Either this or the [**mysql\_store\_result(3)**](/man/enterprise-packages/mariadb-11.2/mysql_store_result.3) function must be called before the results of a query can be retrieved, and one or the other must be called to prevent the next query on that database connection from failing.

## [Parameters](#Parameters)

•

mysql is a connection identifier, which was previously allocated by [**mysql\_init(3)**](/man/enterprise-packages/mariadb-11.2/mysql_init.3) and connected by [**mysql\_real\_connect(3)**](/man/enterprise-packages/mariadb-11.2/mysql_real_connect.3).

## [Notes](#Notes)

The mysql\_use\_result() function does not transfer the entire result set. Hence several functions like [**mysql\_num\_rows(3)**](/man/enterprise-packages/mariadb-11.2/mysql_num_rows.3) or [**mysql\_data\_seek(3)**](/man/enterprise-packages/mariadb-11.2/mysql_data_seek.3) cannot be used. mysql\_use\_result() will block the current connection until all result sets are retrieved or result set was released by [**mysql\_free\_result(3)**](/man/enterprise-packages/mariadb-11.2/mysql_free_result.3).

## [Return value](#Return_value)

Returns an unbuffered result set or NULL if an error occurred.

## [See also](#See_also)

•

[**mysql\_store\_result(3)**](/man/enterprise-packages/mariadb-11.2/mysql_store_result.3)

•

[**mysql\_free\_result(3)**](/man/enterprise-packages/mariadb-11.2/mysql_free_result.3)

Version 3.3.1

---

Document: mysql_use_result(3) from mariadb-11.2 11.2.5-r0 (Chainguard OS)
