GNU Info

Info Node: (mysql.info)mysql_error

(mysql.info)mysql_error


Next: mysql_escape_string Prev: mysql_errno Up: C API functions
Enter node , (file) or (file)node

`mysql_error()'
...............

`char *mysql_error(MYSQL *mysql)'

Description
...........

For the connection specified by `mysql', `mysql_error()' returns the
error message for the most recently invoked API function that can
succeed or fail.  An empty string (`""') is returned if no error
occurred.  This means the following two tests are equivalent:

     if(mysql_errno(&mysql))
     {
         // an error occurred
     }
     
     if(mysql_error(&mysql)[0] != '\0')
     {
         // an error occurred
     }

The language of the client error messages may be changed by recompiling
the MySQL client library. Currently you can choose error messages in
several different languages.  Note: Languages.

Return Values
.............

A character string that describes the error.  An empty string if no
error occurred.

Errors
......

None.


automatically generated by info2www version 1.2.2.9