mysql_store_result(3)
π¦ mysql_store_result(3) β bestie edition π
ok so you're in the MariaDB Connector/C manual, and this page is literally the one about grabbing a whole buffered result set. no cap, it's a good one. π
β¨ NAME β¨
mysql_store_result β returns a buffered result set π
πΈ SYNOPSIS πΈ
#include <mysql.h>
MYSQL_RES * mysql_store_result(MYSQL * mysql);
π DESCRIPTION π
It returns a buffered resultset from the last query you executed. that's it, that's the whole vibe. β¨
π Notes π
mysql_field_count()indicates if there will be a result set available. iykyk β check it before you assume there's anything to store. π- The memory allocated by
mysql_store_result()needs to be released by calling the functionmysql_free_result(3). do not forget this one, bestie, or you're leaking memory and the vibe check will fail. π
π«Ά PARAMETERS π«Ά
mysqlis a connection identifier, which was previously allocated bymysql_init(3)and connected bymysql_real_connect(3). so like, it has to be a real live connection already, not a random pointer you found on the floor. π
β RETURN VALUE β
Returns a buffered result set β or NULL in case an error occurred, or if the query didn't return data (e.g. when executing an INSERT, UPDATE, DELETE or REPLACE statement). so yeah, NULL here isn't always a disaster, sometimes your query just had nothing to say. π
π SEE ALSO π
and that's the whole page, periodt. π this was MariaDB Connector/C, Version 3.4 β go forth and mysql_free_result your stuff, mwah πβ¨
π¦ 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