mysql_real_query(3)
π Name π
okay so bestie, this is mysql_real_query(3) β MariaDB Connector/C edition, and she's here to execute a statement on the database server. Binary safe, no cap. π
β¨ Synopsis β¨
#include <mysql.h>
int mysql_real_query(MYSQL * mysql,
const char * query,
unsigned long length);
πΈ Description πΈ
mysql_real_query() is the binary safe function for performing a statement on the database server. It's giving "I can handle your query, bestie" energy. π
π Parameter π
mysqlβ a mysql handle, which was previously allocated bymysql_init(3)and connected bymysql_real_connect(3). Like, she needs to be initialized and connected first, periodt.queryβ a string containing the statement to be performed. Your actual query goes here, and it's literally the main character.lengthβ length of the string. Yes, you have to tell her how longqueryis. Slay.
π¦ Notes π¦
- Contrary to the
mysql_query(3)function,mysql_real_queryis binary safe. That's the whole point, bestie β she doesn't flinch at binary data. π - To determine if
mysql_real_queryreturns a result set use themysql_num_fields(3)function. So if you're wondering "did I get a result set or not?",mysql_num_fields(3)is your girl. π«Ά
π Return value π
Returns zero on success, otherwise non zero. So zero = she ate, non zero = something's off. π
π See also π
okay that's the whole vibe, bestie. MariaDB Connector/C, Version 3.4, mysql_real_query(3) β she's iconic, she's binary safe, and she's out. πβ¨ππ¦πΈπ
π«Άππβ
π¦ 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