mysql_stmt_bind_param - mariadb-corporation/mariadb-connector-c GitHub Wiki
mysql_stmt_bind_param - Binds parameter to a prepared statement
#include <mysql.h>
my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt,
MYSQL_BIND * bind);
Binds variables for parameter markers in the prepared statement that was passed to mysql_stmt_prepare(). Returns zero on success, non-zero on failure.
-
stmt
- a statement handle, which was previously allocated by mysql_stmt_init(). -
bind
- an array ofMYSQL_BIND
structures. The size of this array must be equal to the number of parameters.
- The number of parameters can be obtained by mysql_stmt_param_count().
- If the number of parameters is unknown, for example when using mariadb_stmt_execute_direct(), the number of parameters have to be specified with the mysql_stmt_attr_set() function.