Name

mysql_sqlstate( )

Synopsis

const char *mysql_sqlstate(MYSQL *mysql)

This returns the SQLSTATE error code for the last error that occurred for the current connection. The string will contain five characters and is terminated with a NULL character. A lack of error is signified by “00000” and unmapped errors by “HY000”.

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.