mysql_query3
Name
mysql_query - executes a null terminated statement string
Synopsis
-
#include <mysql.h> int mysql_query(MYSQL * mysql, const char * query);
Description
Performs a statement pointed to by the null terminate string query against the database. Contrary to mysql_real_query(3), mysql_query() is not binary safe.
Parameter
- •
-
mysql- a mysql handle, which was previously allocated bymysql_init(3)and connected bymysql_real_connect(3).
- •
-
query-a null terminated string containing the statement to be performed.
Notes
- •
-
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(3)or escape your data withmysql_hex_string(3).
- •
-
To determine if a statement returned a result set use the function
mysql_field_count(3).
Return value
Returns zero on success, non zero on failure.
See also
•
|
|
|---|---|
•
|
|
•
|
|
•
|
|
•
|
Releases
3 releases since Debian 12 (Bookworm); the text changed 1 time.