This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-14. For the latest, interactive version please visit https://mariadb.com/kb/.

mysql_stmt_execute

Syntax

int mysql_stmt_execute(MYSQL_STMT * stmt);

Description

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.

Returns zero on success, non-zero on failure.

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

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.