in reply to DBI fails to return an error code
Hi, the solution can be found at:
http://search.cpan.org/~capttofu/DBD-mysql-4.023/lib/DBD/mysql.pmThere you find:
DATABASE HANDLESUse $dbh->{'mysql_error'} instead of $DBI::errstr like here:
my $sql = "delete from not_existing_table where ai = 12"; $dbh->do( $sqlbef ) || die "Problem: $dbh->{'mysql_error'}\n";
you will get the answer:
Problem: Table 'not_existing_table' doesn't exist
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI fails to return an error code
by mje (Curate) on May 13, 2013 at 10:57 UTC |