mysql_stmt_errno(3)
β¨ mysql_stmt_errno β bestie edition β¨
okay so this is mysql_stmt_errno(3), and it lives in the MariaDB Connector/C manual π she's a tiny function but she's so useful, trust.
π« NAME
mysql_stmt_errno β returns the error code for the last statement error π«Ά
πΈ SYNOPSIS
#include <mysql.h>
unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
π DESCRIPTION
so like. you call this and it hands you the error code for the most recently invoked statement function that can succeed or fail. that's it. that's the whole vibe π
the way that it's literally just "what went wrong last time, bestie" energy π
π¦ PARAMETER
stmtβ a statement handle, which was previously allocated bymysql_stmt_init(3). no random handles pls, she needs the real one π
β RETURN VALUE
Returns the error code β¨
A zero value means that no error occurred β iconic, we love a zero, main character behavior π
π₯ NOTES
- Client error messages are listed in the
errmsg.hheader file. Server error messages are listed in themysqld_error.hheader file of the server source distribution. so if you're staring at a number like ??? go look it up in there, iykyk π
π SEE ALSO
ngl if you got a nonzero back, that's your cue to go read the actual message, not just the number. the number alone is giving cryptic π
and that's the whole page, periodt π
this was Version 3.4 of the MariaDB Connector/C docs for mysql_stmt_errno(3) β go forth and debug slayfully, bestie πππΈπ¦
π¦ 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