-
Notifications
You must be signed in to change notification settings - Fork 258
mysql_query
Georg Richter edited this page Aug 17, 2018
·
2 revisions
mysql_query - executes a null terminated statement string
#include <mysql.h>
int mysql_query(MYSQL * mysql,
const char * query);
Performs a statement pointed to by the null terminate string query against the database. Contrary to mysql_real_query(), mysql_query() is not binary safe.
-
mysql
- a mysql handle, which was previously allocated by mysql_init() and connected by mysql_real_connect(). -
query
-a null terminated string containing the statement to be performed.
- For executing multi statements the statements within the null terminated string statements must be separated by a semicolon.
- If your statement contains binary data you should use mysql_real_query() or escape your data with mysql_hex_string().
- To determine if a statement returned a result set use the function mysql_field_count().
Returns zero on success, non zero on failure.
MariaDB Connector/C Reference