mysql_stmt_errno(3)

πŸ“¦
version 13.0.2 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 by mysql_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.h header file. Server error messages are listed in the mysqld_error.h header 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