You'll have to use whatever error reporting functions are available to the particular mysql extension or abstraction library that you're using. For example, if you're using the plain 'ole "mysql_" ...