# mysql\_read\_query\_result

## Syntax

```c
int mysql_read_query_result(MYSQL * mysql);
```

* `mysql` - a mysql handle, which was previously allocated by [mysql\_init()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_init) or [mysql\_real\_connect()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_real_connect).

Returns zero on success, otherwise non-zero.

## Description

`mysql_read_query_result()` reads the result of a SQL statement executed with [mysql\_send\_query()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_send_query). If the SQL statement returned a resultset, it must be freed before the next call to `mysql_read_query_result()` is made. This is similar to how results from [mysql\_query()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_query) must be processed before another call can be made.

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