# mysql\_fetch\_row

## Syntax

```c
MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
```

* `result` - a result set identifier returned by [mysql\_store\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_store_result) or [mysql\_use\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_use_result).

## Description

Fetches one row of data from the result set and returns it as an array of char pointers (MYSQL\_ROW), where each column is stored in an offset starting from 0 (zero). Each subsequent call to this function will return the next row within the result set, or NULL if there are no more rows.

{% hint style="info" %}
If a column contains a NULL value the corresponding char pointer will be set to NULL.

Memory associated to MYSQL\_ROW will be freed when calling [mysql\_free\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_free_result) function.
{% endhint %}

## See also

* [mysql\_use\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_use_result)
* [mysql\_store\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_store_result)

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