# mysql\_stmt\_data\_seek

## Syntax

```c
void mysql_stmt_data_seek(MYSQL_STMT * stmt,
                          my_ulonglong offset);
```

* `stmt` - a statement handle, which was previously allocated by [mysql\_stmt\_init()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_init.md).
* `offset` - row offset. This value must between 0 and number of rows - 1.

## Description

Seeks to an arbitrary row in statement result set obtained by a previous call to [mysql\_stmt\_store\_result()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_store_result.md). Returns void.

{% hint style="info" %}
The number of rows can be obtained with the function [mysql\_stmt\_num\_rows()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_num_rows.md).
{% endhint %}

## See Also

* [mysql\_stmt\_row\_tell()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_row_tell.md)
* [mysql\_stmt\_store\_result()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_store_result.md)
* [mysql\_stmt\_num\_rows()](/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_num_rows.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-prepared-statement-functions/mysql_stmt_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.
