mysql_stmt_result_metadata(3)
π NAME π
okay bestie, welcome to the MariaDB Connector/C manual page for mysql_stmt_result_metadata(3) β and yes, it does exactly what it says on the tin: it returns result set metadata from a prepared statement. iconic behavior, honestly. π
π SYNOPSIS π
#include <mysql.h>
MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
πΈ DESCRIPTION πΈ
so here's the tea: if you pass a statement to mysql_stmt_prepare(3) and that statement is one that produces a result set, then mysql_stmt_result_metadata() hands you back the result set you need to process the meta info. we're talking total number of fields and individual field information. it's giving backstage pass to the metadata, no rows invited. π
π«Ά PARAMETER π«Ά
stmtβ a statement handle, which was previously allocated bymysql_stmt_init(3). don't just roll up with any old pointer, bestie, it has to be one thatmysql_stmt_init(3)already set you up with. β¨
π RETURN VALUE π
Returns a result set that can be used to process metadata information. that's it, that's the whole gift. π
π NOTES π
- The result set returned by
mysql_stmt_result_metadata()contains only metadata. It does not contain any row results. The rows are obtained bymysql_stmt_fetch(3). so don't go looking for actual data in there, it's not that kind of party. π - This result set pointer can be passed as an argument to any of the field-based functions that process result set metadata, such as:
mysql_num_fields(3),mysql_fetch_field(3),mysql_fetch_field_direct(3),mysql_fetch_fields(3),mysql_field_count(3),mysql_field_seek(3),mysql_field_tell(3),mysql_free_result(3). literally a whole friend group of metadata functions, and this pointer is the group chat. π«Ά
π SEE ALSO π
Version 3.4 of the MariaDB Connector/C manual, no date on the page but the vibe is timeless. that's the whole page, bestie β now go process that metadata and slay. πβ¨ππ¦πΈπ π«Άππ₯ππβππππ§π
π¦ 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