mysql_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

✨ mysql_fetch_fields β€” bestie edition ✨

okay so this is a page from the MariaDB Connector/C manual (that's the manual name, in case you were wondering, and yes we're all collectively obsessed with it) πŸ’–


🌸 NAME 🌸

mysql_fetch_fields β€” returns an array of fields 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <mysql.h>

MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);

πŸ’… DESCRIPTION πŸ’…

so listen. this function is doing literally the exact same job as mysql_fetch_field(3) β€” no cap, identical purpose β€” with one single difference, and it's kind of the whole personality:

instead of handing you one field at a time, one per field, it hands you all of them as an array. that's it. that's the vibe. main character energy: the whole group chat shows up at once instead of one friend at a time πŸ’€

and bestie, each field in that array contains the definition for a column of the result set. every single one. periodt. πŸ‘‘


πŸŽ€ PARAMETERS πŸŽ€

  • res β€” a result set identifier returned by mysql_store_result(3) or mysql_use_result(3). that's your ticket, your golden pass, the thing you got from one of those two functions, no substitutions allowed fr fr 🎟️

🌈 NOTES 🌈

the total number of fields can be obtained by mysql_field_count(3). so if you need to know how many lil fields you're working with β€” that's where you go, iykyk πŸ’«


⭐ RETURN VALUE ⭐

an array of type MYSQL_FIELD. that's the whole return. slay. πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page!! this was Version 3.4 of the MariaDB Connector/C manual, so if you ever forget which version you're reading, it's 3.4, and now you know πŸ’œ bye bestie, go fetch those fields 🧚✨🌸

πŸ“¦ where this page comes from