For the complete documentation index, see llms.txt. This page is also available as Markdown.

mysql_stmt_error

mysql_stmt_error retrieves the human-readable error message from the last Connector/C prepared statement call, complementing the numeric code from mysql_stmt_errno.

Syntax

const char * mysql_stmt_error(MYSQL_STMT * stmt);

Parameter

Description

Returns a string containing the error message for the most recently invoked statement function that can succeed or fail. The string will be empty if no error occurred.

Return Value

A string describing the last error or an empty string if no error occurred.

Client error messages are listed in the errmsg.h header file, server error messages are listed in the mysqld_error.h header file of the server source distribution.

See Also

This page is: Copyright © 2026 MariaDB. All rights reserved.

spinner

Last updated

Was this helpful?