in reply to Re: DBI-do return value
in thread DBI-do return value

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

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

Replies are listed 'Best First'.
Re: Re: Re: DBI-do return value
by mpeppler (Vicar) on Nov 29, 2001 at 22:22 UTC
    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

Re: Re: Re: DBI-do return value
by barndoor (Pilgrim) on Nov 29, 2001 at 20:01 UTC
    That will only work if $nr is a statement handle. In the above example $nr was a row count, not a statement handle.