$sth = $dbh->prepare($sqla); eval { local $SIG{'__DIE__'}; $answer = $sth->execute(); }; if ($@) { $mailbody .= "Cannot insert into $database \n"; } else { $sth->finish() if defined $sth; }
In reply to trapping database errors by venki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |