# mysql\_fetch\_row

## Syntax

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

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

## 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()](/docs/connectors/mariadb-connector-c/api-functions/mysql_free_result.md) function.
{% endhint %}

## See also

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

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_fetch_row.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
