Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 studying the Monastery: (9)
As of 2014-08-23 17:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (175 votes), past polls