Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Answer: How can I see error messages from MySQL?

( #21757=categorized answer: print w/ replies, xml ) Need Help??

Q&A > database programming > How can I see error messages from MySQL? contributed by btrott

To follow up with what BBQ wrote... you can either check the return value of your database functions, or you can just use the RaiseError attribute, which will die on an error:
my $dbh = DBI->connect($dsn, $user, $pass, 'mysql', { RaiseError = +> 1 });

Comment on Answer: How can I see error messages from MySQL?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2014-10-23 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (129 votes), past polls