mysql_use_result(3)
β¨ mysql_use_result β bestie edition β¨
okay so this is a page from the MariaDB Connector/C manual, and it's about mysql_use_result(3) π literally the function you call when you want your result set unbuffered, no cap.
π NAME π
mysql_use_result β returns an unbuffered result set. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
#include <mysql.h>
MYSQL_RES * mysql_use_result(MYSQL * mysql);
π¦ DESCRIPTION π¦
so here's the tea, bestie π« β you use this to initiate the retrieval of a result set from the last query you ran with mysql_real_query() on that database connection.
and listen, you gotta pick one: either this function or mysql_store_result(3) β one of them, no skipping, fr fr. Because you literally can't pull the results of a query without one of them. and if you call neither?? the next query on that same database connection is gonna fail π so don't do that to yourself.
π PARAMETERS π
mysqlβ your connection identifier, aka the little guy you already made withmysql_init(3)and then actually hooked up withmysql_real_connect(3). she's your main character connection π
β NOTES β
okay important part, pay attention π«Ά
mysql_use_result() does not transfer the entire result set. it's giving "streaming, not hoarding." and because of that, several functions like mysql_num_rows(3) or mysql_data_seek(3) cannot be used. so don't try, she will not be answering π
also, mysql_use_result() will block the current connection until all result sets are retrieved, or the result set gets released by mysql_free_result(3). so yeah, that connection is busy being booked and blessed until you're done with her π§
π₯ RETURN VALUE π₯
returns an unbuffered result set, or NULL if an error occurred. (if you get NULL, that's your vibe check failing, sorry bestie π)
π SEE ALSO π
Version 3.4 of the MariaDB Connector/C docs, babes β that's a wrap, go forth and retrieve your result sets responsibly, 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