Re: parsing mysql error messages
Dave Howorth <[email protected]>
| Newsgroups | gmane.comp.db.mysql.perl |
|---|---|
| Organization | MRC Centre for Protein Engineering |
| Message-ID | <[email protected]> |
Jochen Wiedmann wrote: > Dave Howorth wrote: > >> But the detailed information, which users want and which my attempt at >> automatic recovery needs, is buried in the MySQL mysql_error string, >> AFAIK. So it seems like I need to parse that and I can't believe I'm >> the first to want to do it :) > > Nonsense, check $dbh->err or $dbh->state (same for $sth). They should > contain the error code as a number. It's not the error code I'm looking for. It's details such as which field(s) failed a UNIQUE constraint, for example. Thanks, Dave -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/[email protected]