mysql_stmt_execute — Executes a prepared statement

int mysql_stmt_execute(MYSQL_STMT * stmt);

Executes a prepared statement which was previously prepared by mysql_stmt_prepare(). When executed any parameter markers which exist will automatically be replaced with the appropriate data.

Parameters

stmt

A statement handle, which was previously allocated by mysql_stmt_init().

Return value

Zero on success, non-zero on failure.

[Note]

If the statement is UPDATE, DELETE, or INSERT, the total number of affected rows can be determined by using the mysql_stmt_affected_rows() function. Likewise, if the query yields a result set the mysql_stmt_fetch() function is used.

See also

mysql_stmt_prepare(), mysql_bind_param()