mysql_row_seek(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_seek β€” bestie, let's teleport that cursor

okay so this is a page from the MariaDB Connector/C manual, and we're talking about mysql_row_seek(3) β€” the function that yeets your row cursor to whatever row you want. no cap. πŸ¦‹


✨ Name ✨

mysql_row_seek β€” positions the row cursor to an arbitrary row. literally just "jump to row, you pick which one". main character energy fr. πŸ‘‘


🌸 Synopsis 🌸

#include <mysql.h>

MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result,
                                MYSQL_ROW_OFFSET offset);

that's the whole vibe. include the header, call the function, get a MYSQL_ROW_OFFSET back. periodt. πŸ’…


πŸ’– Description πŸ’–

so like, mysql_row_seek positions the row cursor to an arbitrary row in a result set β€” but hear me out, bestie, it only works on a result set that was obtained by mysql_store_result(3). that's the whole thing. that's the function. it's giving "fast travel unlocked". ✨


πŸŽ€ Parameter πŸŽ€

  • result β€” a result set identifier, and it's the one returned by mysql_store_result(3). no substitutions, she's specific. πŸ™ˆ
  • offset β€” the row offset. you can get this value from either mysql_row_seek() or mysql_row_tell(3). so you can save a spot and come back to it later, iconic behaviour honestly. πŸ“Œ

πŸ¦‹ Notes πŸ¦‹

  • 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, babe". πŸ’€

⭐ Return value ⭐

Returns the previous row offset. so it tells you where you were while it moves you to where you wanna be. very "here's your receipt, enjoy your new row" of it. 🧾✨


🌈 See also 🌈


and that's the page, bestie!! πŸ’œ this was pulled straight from the MariaDB Connector/C docs, Version 3.4 β€” so if you're out here seeking rows like the icon you are, you're on the right version. mwah. πŸ’‹πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from