mysql_stmt_field_count(3)
π mysql_stmt_field_count β bestie, how many fields are we even working with?? π
okay so this one lives in the MariaDB Connector/C manual, page mysql_stmt_field_count(3), and it's genuinely one of the chillest little functions you'll ever meet. no drama, no side quests, it just tells you how many fields are chillin' in your result set. π
β¨ SYNOPSIS β¨
#include <mysql.h>
unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
πΈ DESCRIPTION πΈ
It returns the number of fields in a result set of a prepared statement. that's it. that's the whole vibe. she counts the fields and hands you the number. π
π RETURN VALUE π
The number of fields, or zero if the prepared statement has no result set. zero. nada. nothing to see here, bestie. π
π¦ PARAMETER π¦
stmtβ a statement handle, which was previously allocated bymysql_stmt_init(3). so like, you gotta have already made the statement before you can ask her anything, obviously. β¨
π NOTES π
- The number of fields will be available after calling
mysql_stmt_prepare(3). so prepare first, then count. order matters, no cap. π₯ mysql_stmt_field_count()returns zero for statements which don't produce a result set. she's not being rude, there's just literally nothing to count. π
π«Ά SEE ALSO π«Ά
and that's the whole page, bestie!! this one came straight outta Version 3.4 of the MariaDB Connector/C docs, so if you're out here counting fields on some other versionβ¦ check your docs, okay?? mwah, go slay your prepared statements πβ¨ππ¦
π¦ 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