mysql_next_result(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_next_result β€” bestie, go get the NEXT result set

okay so real quick: this page lives in the MariaDB Connector/C manual (section 3, the library calls, iykyk). Let's get into it 🌸


πŸŽ€ Name

mysql_next_result β€” prepares next result set ✨


πŸ¦‹ Synopsis

#include <mysql.h>

int mysql_next_result(MYSQL * mysql);

πŸ’… Description

so basically πŸ‘‘ β€” this one prepares the next result set from a previous call to mysql_real_query(3). and like, you then actually grab that result set with mysql_store_result(3) or mysql_use_result(3). the way it works is: returns zero on success, and nonzero if an error occurred. that's it, that's the whole vibe πŸ’–


πŸ“ Parameter

  • mysql β€” a mysql handle 🫢 which was previously allocated by mysql_init(3) and connected by mysql_real_connect(3). like, it has to be a real, live, connected handle bestie, no fake ones πŸ’€

✨ Notes

  • 🚨 if a multi query contains errors, the return value of mysql_errno(3) and mysql_error(3) might change, and there will be no result set available. so like, don't be out here assuming there's a result waiting for you β€” because there is not πŸ™ˆ

πŸ‘‘ Return value

Returns zero on success, non zero value on error. periodt πŸ’…


🌈 See also


mwah πŸ’œ that's the whole page, you ate it, no crumbs. this was Version 3.4 of the MariaDB Connector/C manual β€” go forth and loop those result sets like the icon you are 🧚✨

πŸ“¦ where this page comes from