# 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()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_init).
* `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()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_store_result). Returns void.

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

## See Also

* [mysql\_stmt\_row\_tell()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_row_tell)
* [mysql\_stmt\_store\_result()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_store_result)
* [mysql\_stmt\_num\_rows()](https://mariadb.com/docs/connectors/mariadb-connector-c/api-prepared-statement-functions/mysql_stmt_num_rows)

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