mysql_data_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_data_seek β€” seek to an offset, bestie ✨

okay so picture this: you're deep in a MariaDB Connector/C situation, you've got a whole result set sitting there, and you wanna just jump to a specific row like it's a Spotify playlist and you're skipping straight to the banger. that's this function. it's from the MariaDB Connector/C manual and honestly? it's giving teleportation. πŸ¦‹


🌸 NAME 🌸

mysql_data_seek</p> β€” seeks to an offset πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <mysql.h>

void mysql_data_seek(MYSQL_RES * result,
                     my_ulonglong offset);

πŸ’– DESCRIPTION πŸ’–

The mysql_data_seek() function seeks to an arbitrary function result pointer specified by the offset in the result set. Returns zero on success, nonzero if an error occurred.

so basically: you point at wherever you wanna be in the result set, and it goes there. returns 0 when it ate, nonzero when it didn't. that's the whole vibe check. ✨


🌈 PARAMETERS 🌈

  • result β€” a result set identifier returned by mysql_store_result(). like, you can't just make one up, it's gotta come from there, iykyk. 🫢
  • offset β€” the field offset. Must be between zero and the total number of rows minus one (0..mysql_num_rows - 1). fr fr, respect the range or it's not gonna be cute. 😭

🧚 NOTES 🧚

This function can only be used with buffered result sets obtained from the use of the mysql_store_result(3) function.

read that again bestie. only buffered result sets, only ones that came out of mysql_store_result(3).** no exceptions, no workarounds, no main character loopholes. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, periodt. go seek some offsets, you iconic little coder. πŸ’œ

this lil guide is straight outta <strong>Version 3.4</strong> of the MariaDB Connector/C docs β€” catch you in the next manpage, mwah πŸŽ€πŸ¦‹β­

πŸ“¦ where this page comes from