# mysql\_data\_seek

## Syntax

```c
void mysql_data_seek(MYSQL_RES * result,
                     my_ulonglong offset);
```

* `result` - a result set identifier returned by mysql\_store\_result().
* `offset` - the field offset. Must be between zero and the total number of rows minus one (0..mysql\_num\_rows - 1).

## Description

The mysql\_data\_seek() function seeks to an arbitrary function result pointer specified by the offset in the result set. Returns zero on success, nonzero if an error occurred.

{% hint style="info" %}
This function can only be used with buffered result sets obtained from the use of the [mysql\_store\_result](/docs/connectors/mariadb-connector-c/api-functions/mysql_store_result.md) function.
{% endhint %}

{% @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_data_seek.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.
