mysql_stmt_warning_count(3)
π mysql_stmt_warning_count β a MariaDB Connector/C moment π
okay bestie, settle in, because this one is short but she matters. This is mysql_stmt_warning_count(3), part of the MariaDB Connector/C lineup, and she does exactly one job and does it flawlessly. no notes. π«Ά
β¨ NAME β¨
mysql_stmt_warning_count β returns the number of warnings from the last executed statement. that's it, that's the whole girl. π
πΈ SYNOPSIS πΈ
#include <mysql.h>
unsigned int mysql_stmt_warning_count(MYSQL_STMT * stmt);
π¦ DESCRIPTION π¦
So basically, you call this and she hands you back the number of warnings that came out of the last executed statement. and if there were no warnings? she's giving you a big fat zero, no drama, no attitude. π
π Parameter
stmtβ a statement handle, which was previously allocated bymysql_stmt_init(3). like, you gotta have made her first, bestie. she's not gonna spawn out of thin air. β¨
π RETURN VALUE π
Returns the number of warnings. that's it. a whole unsigned int of truth. π₯
π NOTES π
- if you actually wanna read the warning messages (not just count them), you should use the SQL command
SHOW WARNINGS. the count is the vibe check,SHOW WARNINGSis the group chat receipts. π¬ - if
SQL_MODE TRADITIONALis enabled, an error instead of a warning will be returned. so like... plot twist. for detailed information check the server documentation. π
bestie this is important: with SQL_MODE TRADITIONAL on, you're not getting a cute little warning count situation β you're getting an error. know the difference, protect your peace. π
π History
This function was added in Connector/C 3.0. she's been iconic since day one, fr fr. β
π SEE ALSO π
mysql_warning_count(3)β her cousin. same energy, different scope. iykyk. π§
and that's the whole page, bestie! π Version 3.4 of MariaDB Connector/C, brought to you with love β mwah, go forth and count your warnings responsibly. πβ¨π
π¦ 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