Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 rifling through the Monastery: (12)
As of 2015-05-06 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (134 votes), past polls