Paul Hoepfner-Homme wrote:
> I now realize I was mistaken that $sth->rows() didn't return the number
> of rows on a SELECT -- it actually does work properly with SELECTs. But
> it turns out that that's the one case where I don't even need it. :) I
> need it for UPDATEs and DELETEs, and it reliably returns -1 for each of
> those queries in this script.
So this clarifies a lot.
$sth->rows is useless in the case of UPDATE and/or DELETE, if you
are using $dbh->do which you typically will do. Of course you may
use a sequence prepare, execute. In that case $sth->rows should work
as expected: In other words, it returns the value of msqlNumRows.
A simpler solution is using
my $numRows = $dbh->do(...)
Does that work?

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.