(mysql.info.gz) mysql_error
Info Catalog
(mysql.info.gz) mysql_errno
(mysql.info.gz) C API functions
(mysql.info.gz) mysql_escape_string
22.2.3.13 `mysql_error()'
.........................
`const char *mysql_error(MYSQL *mysql)'
Description
...........
For the connection specified by `mysql', `mysql_error()' returns a
null-terminated string containing the error message for the most
recently invoked API function that failed. If a function didn't fail,
the return value of `mysql_error()' may be the previous error or an
empty string to indicate no error.
A rule of thumb is that all functions that have to ask the server for
information will reset `mysql_error()' if they succeed.
For functions that reset `mysql_errno()', 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. Languages.
Return Values
.............
A null-terminated character string that describes the error. An empty
string if no error occurred.
Errors
......
None.
Info Catalog
(mysql.info.gz) mysql_errno
(mysql.info.gz) C API functions
(mysql.info.gz) mysql_escape_string
automatically generated byinfo2html