mysql_more_results(3)
π mysql_more_results π
okay bestie, welcome to the MariaDB Connector/C section of the manual, and today's main character is mysql_more_results β the lil function that tells you if there's more waiting for you. she's giving "is that all?" but in C. β¨
πΈ NAME πΈ
mysql_more_results β indicates if one or more results are available
like, is there more tea to spill or are we done here? that's literally her whole job. π
π SYNOPSIS π
#include <mysql.h>
my_bool mysql_more_results(MYSQL * mysql);
yes, that's it. one line, one arg, no drama. she's low maintenance and we love that for her. π«Ά
π¦ DESCRIPTION π¦
Indicates if one or more result sets are available from a previous call to mysql_real_query(3).
so like β you already ran mysql_real_query(3), right? and now you're sitting there wondering if the server sent back more than one result set. that's the vibe check this function runs. it peeks at the situation and tells you whether there are one or more result sets still hanging out, waiting for you to come get them. no cap. π
β PARAMETER β
mysqlβ a connection identifier, which was previously allocated bymysql_init(3)and connected bymysql_real_connect(3).
so you can't just roll up with a random pointer, bestie π that connection needs to have been born via mysql_init(3) and then actually connected with mysql_real_connect(3) first. it's giving "papers, please". π
β¨ NOTES β¨
- The function
mysql_set_server_option(3)enables or disables multi statement support.
so if you're out here wondering why you're not getting multiple result sets... check that setting first, bestie. mysql_set_server_option(3) is the switch that turns multi statement support on and off. no switch, no multi. it's that simple. π
- Multiple result sets can be obtained either by calling a stored procedure or by executing concatenated statements, e.g.
SELECT a FROM t1;SELECT b, c FROM t2.
so there's two ways to end up with a whole stack of result sets instead of just one: call a stored procedure, or execute concatenated statements. like this, for example:
SELECT a FROM t1;SELECT b, c FROM t2
two statements, one string, two result sets. iconic behaviour honestly. π₯
π RETURN VALUE π
Returns 1 if more result sets are available, otherwise zero.
so: 1 = bestie there's more π, 0 = that's all, we're done here. super simple, super clean, no weird error codes to decode. periodt.
πΈ SEE ALSO πΈ
mysql_real_query(3)mysql_use_result(3)mysql_store_result(3)mysql_next_result(3)mysql_set_server_option(3)
go read those too, they're literally her besties and they all work together. iykyk. π
Version 3.4 of the MariaDB Connector/C manual, and that's the whole page bestie β mysql_more_results says goodnight πβ¨ππ¦πΈπ
π«Ά
π¦ 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