mysql_stmt_next_result(3)
β¨ mysql_stmt_next_result β¨
okay bestie, so this one lives in the MariaDB Connector/C manual, and it's all about grabbing the next result set off a prepared statement. it's giving very "and what else do you have for me" energy π
π Name
mysql_stmt_next_result</puraple> β prepares the next result set of a prepared statement π¦
πΈ Synopsis
#include <mysql.h>
int mysql_stmt_next_result(MYSQL_STMT * stmt);
π Description
so basically, this function prepares the next result set that came out of a previous call to mysql_stmt_execute(3). and then you can actually go get that result set with mysql_stmt_store_result(3). it's like the group chat has a second message waiting and you're opening it π¬β¨
π«Ά Parameter
stmtβ a statement handle, which was previously allocated bymysql_stmt_init(). that's your girl, your main character, the one you built earlier π
π Return value
returns zero on success, and nonzero if an error occurred. so zero = slay, nonzero = something went sideways π
π Notes
- the function
mysql_stmt_more_results(3)is the one that tells you if further result sets are even available. like, it's the vibe check before you go looking π - if the execution of a stored procedure produced multiple result sets, the return value of
mysql_stmt_errno(3)/error()might change, and there will be no result set available. so heads up β the error state can shift on you and you might come up empty-handed π«
π¦ See also
Version 3.4, bestie β that's the era this page is serving. mwah, go forth and fetch those result sets πππ«Άβ¨
π¦ where this page comes from
- alpine 3.22: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.23: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb-connector-c-doc 3.4.4-2.el10 Β· LGPL-2.1-or-later
- debian trixie: libmariadb-dev 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb-connector-c-doc 3.4.5-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 43: mariadb-connector-c-doc 3.4.9-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- fedora 44: mariadb-connector-c-doc 3.4.8-3.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 44: mariadb-connector-c-doc 3.4.9-2.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- ubuntu questing: libmariadb-dev 1:11.8.3-1build1
- ubuntu resolute: libmariadb-dev 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: libmariadb-dev 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libmariadb-dev 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms