mariadb_stmt_fetch_fields(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

✨ mariadb_stmt_fetch_fields ✨

okay bestie, we're in the MariaDB Connector/C manual and today's main character is mariadb_stmt_fetch_fields β€” she returns an array of fields holding the column definitions. iconic behavior fr fr πŸ’…


🌸 Name 🌸

mariadb_stmt_fetch_fields β€” returns an array of fields containing the column definitions 🫢


πŸŽ€ Synopsis πŸŽ€

#include <mysql.h>

MYSQL_FIELD *mariadb_stmt_fetch_fields(MYSQL_STMT * stmt);

πŸ¦‹ Description πŸ¦‹

so basically she hands you back an array of fields. every single field in there holds the definition for a column of the result set. ✨

and if the statement doesn't have a result set? NULL pointer, returned to you, no cap. 😭


πŸ’– Parameter πŸ’–

  • stmt β€” a statement handle, which was previously allocated by mysql_stmt_init(3). like, she needs to already exist, you can't just make her up πŸ’…

⭐ Notes ⭐

the number of fields? you can get that from mysql_stmt_field_count(3) πŸ‘‘


🌈 History 🌈

this function was added in MariaDB Connector/C 3.1.0 β€” so she's been around, lowkey a legend πŸŽ€


πŸ‘‘ See Also πŸ‘‘


Version 3.4 of the MariaDB Connector/C manual, and honestly? she ate. that's the whole page bestie, go forth and fetch those fields πŸ’–βœ¨πŸ¦‹πŸŽ€πŸ«ΆπŸ’…

πŸ“¦ where this page comes from