mysql_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

πŸ’– mysql_row_tell β€” bestie, where is your cursor at?? πŸ’–

okay so this is a page from the MariaDB Connector/C manual, and we're talking about mysql_row_tell(3) β€” the little function that tells you exactly which row your result cursor is sitting on. no cap, it's giving "where am I" but for your result set. 🫢


✨ NAME ✨

mysql_row_tell β€” returns the row offset of a result cursor πŸŽ€


✨ SYNOPSIS ✨

#include <mysql.h>

MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);

like. that's the whole vibe. one arg, one return. slay. πŸ’…


✨ DESCRIPTION ✨

So basically mysql_row_tell() returns the row offset of a result cursor. πŸ¦‹

and here's the iconic part: that offset value it hands you? you can feed it straight into mysql_row_seek(3) to reposition the result cursor. it's literally a lil bookmark for your result set. obsessed. ✨


✨ PARAMETER ✨

  • res β€” a result set identifier returned by mysql_store_result(3). that's it, that's the one. πŸ“

✨ NOTES ✨

  • 🚨 important bestie: this function will not work if the result set was obtained by mysql_use_result(3). like, at all. don't try it. it's giving "wrong door, no entry". 😭

✨ SEE ALSO ✨


fr fr, if you need the cursor's location, this is your girl. if your result came from mysql_use_result(3), this is not your girl. πŸ’€

and that's the whole page, bestie!! Version 3.4 of the MariaDB Connector/C manual, mysql_row_tell(3), signing off β€” go forth and seek responsibly πŸ‘‘πŸŒˆπŸ’œ

πŸ“¦ where this page comes from