> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_data_seek.md).

# mysql\_stmt\_data\_seek

## Syntax

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

## Parameters

* `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).

## Return Value

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" %}
