mysql_error

mysql_error returns the error message string for the most recent failed MariaDB Connector/C function call, or an empty string if no error occurred.

Syntax

const char * mysql_error(MYSQL * mysql);

Parameter

Description

Returns the last error message for the most recent function call that can succeed or fail. If no error occurred an empty string is returned.

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

  • Client error messages can be obtained by calling mariadb_get_infov() and passing the parameter MARIADB_CLIENT_ERRORS

See Also

spinner

Last updated

Was this helpful?