mysql_field_seek(3)
β¨ mysql_field_seek β¨
okay bestie, welcome to the MariaDB Connector/C manual, section 3 π this one's about mysql_field_seek and it's literally the "jump to that column, bestie" function, no cap.
πΈ Name πΈ
mysql_field_seek β sets the field cursor to given offset π
π¦ Synopsis π¦
#include <mysql.h>
MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result,
MYSQL_FIELD_OFFSET offset);
π Description π
So here's the vibe: mysql_field_seek sets the field cursor to the given offset. That's it, that's the whole job, and it ate. π
And the payoff? The next call to mysql_fetch_field(3) will retrieve the field definition of the column associated with that offset. So you're basically telling the cursor "girl, go stand over there" and then the next fetch serves you exactly that column's field definition. iconic behaviour honestly π
π Parameters π
resultβ a result set identifier returned bymysql_store_result(3)ormysql_use_result(3). it's the whole result set babe, you gotta hand it over π«Άoffsetβ the field number. and listen, this number must be in the range from0..number of fields - 1. color inside the lines or it's giving chaos π
π Notes π
- The number of fields can be obtained from
mysql_field_count(3). use it, bestie, don't guess π - To move the field cursor to the first field, the
offsetparameter should be zero. first field, zero offset, that's the rule π
β Return value β
Returns the previous value of the field cursor. yes, the old one, not the new one β she remembers where you were before you moved, and that's on main character energy π
π₯ See also π₯
mysql_field_tell(3)β the other half of this duo, go say hi π
Version 3.4 of the MariaDB Connector/C man pages, and that's a wrap bestie π mwah, go forth and seek those fields, you absolute Unix icon π§β¨
π¦ where this page comes from
- alpine 3.22: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.23: mariadb-doc 11.4.13-r0 Β· GPL-2.0-or-later
- alpine 3.24: mariadb-doc 11.8.9-r0 Β· GPL-2.0-only
- arch rolling: mariadb 13.0.2-2 Β· GPL-2.0-only
- arch rolling: mariadb-lts 12.3.3-2 Β· GPL-2.0-only
- centos-stream 10: mariadb-connector-c-doc 3.4.4-2.el10 Β· LGPL-2.1-or-later
- debian trixie: libmariadb-dev 1:11.8.6-0+deb13u1 Β· GPL-2.0-only
- fedora 43: mariadb-connector-c-doc 3.4.5-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 43: mariadb-connector-c-doc 3.4.9-2.fc43 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- fedora 44: mariadb-connector-c-doc 3.4.8-3.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01
- fedora 44: mariadb-connector-c-doc 3.4.9-2.fc44 Β· LGPL-2.1-or-later AND PHP-3.0 AND PHP-3.01 AND LicenseRef-Fedora-Public-Domain
- nixpkgs unstable: mariadb-server 11.8.8
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: libmariadb-devel 3.4.9-160000.1.1 Β· LGPL-2.1-or-later
- ubuntu questing: libmariadb-dev 1:11.8.3-1build1
- ubuntu resolute: libmariadb-dev 1:11.8.6-5 Β· GPL-2.0-only
- ubuntu resolute: libmariadb-dev 1:11.8.6-5ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libmariadb-dev 1:11.8.9+ds-4ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms