Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
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 cooling their heels in the Monastery: (8)
As of 2015-09-01 07:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (367 votes), past polls