mysql_store_result(3)

πŸ“¦
version 13.0.2 Β· 5 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_store_result(3) β€” bestie edition πŸ’…

ok so you're in the MariaDB Connector/C manual, and this page is literally the one about grabbing a whole buffered result set. no cap, it's a good one. πŸŽ€


✨ NAME ✨

mysql_store_result β€” returns a buffered result set πŸ’–


🌸 SYNOPSIS 🌸

#include <mysql.h>

MYSQL_RES * mysql_store_result(MYSQL * mysql);

πŸ‘‘ DESCRIPTION πŸ‘‘

It returns a buffered resultset from the last query you executed. that's it, that's the whole vibe. ✨

πŸ’€ Notes πŸ’€

  • mysql_field_count() indicates if there will be a result set available. iykyk β€” check it before you assume there's anything to store. πŸ™ˆ
  • The memory allocated by mysql_store_result() needs to be released by calling the function mysql_free_result(3). do not forget this one, bestie, or you're leaking memory and the vibe check will fail. 😭

🫢 PARAMETERS 🫢

  • mysql is a connection identifier, which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). so like, it has to be a real live connection already, not a random pointer you found on the floor. 🌈

⭐ RETURN VALUE ⭐

Returns a buffered result set β€” or NULL in case an error occurred, or if the query didn't return data (e.g. when executing an INSERT, UPDATE, DELETE or REPLACE statement). so yeah, NULL here isn't always a disaster, sometimes your query just had nothing to say. πŸ’€


🌈 SEE ALSO 🌈


and that's the whole page, periodt. πŸ’œ this was MariaDB Connector/C, Version 3.4 β€” go forth and mysql_free_result your stuff, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from