in reply to DBI-do return value

0E0 means 0-but-true. This is so that do() can report 0 rows affected, but not cause your
or die $dbh->errstr
to be called.

Replies are listed 'Best First'.
Re: Re: DBI-do return value
by hakkr (Chaplain) on Nov 29, 2001 at 17:56 UTC

    You could also use the DBI method $nr->rows();

    my $rows_affected=$nr->rows();

      You can't call rows() on a database handle, only on a statement handle, which of course means that you can't do
      $dbh->do(....); $rows = $dbh->rows(); # won't work!

      Michael

      That will only work if $nr is a statement handle. In the above example $nr was a row count, not a statement handle.