mysql\_stmt\_next\_result(3) MariaDB Connector/C mysql\_stmt\_next\_result(3)

## [Name](#Name)

mysql\_stmt\_next\_result - prepares next result set of a prepared statement

## [Synopsis](#Synopsis)

```
#include <mysql.h>
int mysql_stmt_next_result(MYSQL_STMT * stmt);
    
```

## [Description](#Description)

Prepares next result set from a previous call to [**mysql\_stmt\_execute(3)**](/man/os/mariadb-11.8/mysql_stmt_execute.3) which can be retrieved by [**mysql\_stmt\_store\_result(3)**](/man/os/mariadb-11.8/mysql_stmt_store_result.3).

## [Parameter](#Parameter)

•

stmt - a statement handle, which was previously allocated by \[mysql\_stmt\_init()](mysql\_stmt\_init().]]

## [Return value](#Return_value)

Returns zero on success, nonzero if an error occurred.

## [Notes](#Notes)

•

The function [**mysql\_stmt\_more\_results(3)**](/man/os/mariadb-11.8/mysql_stmt_more_results.3) indicates if further result sets are available.

•

If the execution of a stored procedure produced multiple result sets the return value of [**mysql\_stmt\_errno(3)**](/man/os/mariadb-11.8/mysql_stmt_errno.3)/error() might change and there will be no result set available.

## [See also](#See_also)

•

[**mysql\_stmt\_execute(3)**](/man/os/mariadb-11.8/mysql_stmt_execute.3)

•

[**mysql\_stmt\_more\_results(3)**](/man/os/mariadb-11.8/mysql_stmt_more_results.3)

Version 3.4

---

Document: mysql_stmt_next_result(3) from mariadb-11.8 11.8.3-r0 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
