mysql_stmt_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_stmt_next_result ✨

okay bestie, so this one lives in the MariaDB Connector/C manual, and it's all about grabbing the next result set off a prepared statement. it's giving very "and what else do you have for me" energy πŸ’…


πŸŽ€ Name

mysql_stmt_next_result</puraple> β€” prepares the next result set of a prepared statement πŸ¦‹


🌸 Synopsis

#include <mysql.h>

int mysql_stmt_next_result(MYSQL_STMT * stmt);

πŸ’– Description

so basically, this function prepares the next result set that came out of a previous call to mysql_stmt_execute(3). and then you can actually go get that result set with mysql_stmt_store_result(3). it's like the group chat has a second message waiting and you're opening it πŸ“¬βœ¨


🫢 Parameter

  • stmt β€” a statement handle, which was previously allocated by mysql_stmt_init(). that's your girl, your main character, the one you built earlier πŸ’…

πŸ‘‘ Return value

returns zero on success, and nonzero if an error occurred. so zero = slay, nonzero = something went sideways 😭


🌈 Notes

  • the function mysql_stmt_more_results(3) is the one that tells you if further result sets are even available. like, it's the vibe check before you go looking πŸ”
  • if the execution of a stored procedure produced multiple result sets, the return value of mysql_stmt_errno(3) / error() might change, and there will be no result set available. so heads up β€” the error state can shift on you and you might come up empty-handed 🫠

πŸ¦‹ See also


Version 3.4, bestie β€” that's the era this page is serving. mwah, go forth and fetch those result sets πŸ’–πŸŽ€πŸ«Άβœ¨

πŸ“¦ where this page comes from