Database and SQL Learning Mode

Which method returns the error code generated from the execution of the last MySQL function?