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

✨ NAME ✨

mysql_stmt_row_tell β€” it literally tells you where the row cursor is at πŸ’… (it's a MariaDB Connector/C thing, bestie, so grab your mysql.h and come sit with me)


🌸 SYNOPSIS 🌸

#include <mysql.h>

MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);

πŸ’– DESCRIPTION πŸ’–

okay so picture this: your result cursor is out there living its main character life, and you're like "bestie... where are you tho?" 😭

That's the whole job. mysql_stmt_row_tell() returns the row offset of a result cursor. And the tea is that the offset value it hands back? You can use it to reposition the result cursor by calling mysql_stmt_row_seek(3). So it's giving bookmark energy β€” save your spot, jump back whenever, iconic behavior fr fr πŸŽ€


πŸ¦‹ PARAMETER πŸ¦‹

  • stmt β€” a statement handle, which was previously allocated by mysql_stmt_init(3). Like, it has to already exist, you can't just show up with vibes and no handle πŸ™ˆ

⭐ RETURN VALUE ⭐

Returns the current position of the row cursor. That's it, that's the gift 🫢


πŸ‘‘ NOTES πŸ‘‘

  • This function can be used for buffered result sets only, which can be obtained by executing the mysql_stmt_store_result(3) function.
lowkey important: buffered only!! if you didn't mysql_stmt_store_result(3) first, this is not the function for you, no cap πŸ’€

🌈 SEE ALSO 🌈


Version 3.4 of MariaDB Connector/C, that's the era we're living in besties ✨ mwah, go slay some result sets, ily, drink water, bye πŸ’–πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from