x5150 has asked for the wisdom of the Perl Monks concerning the following question:
How can I get a number of rows affected inside the transaction? Thanks.$dbh->begin_work; foreach (@$bp_aref) { $bind_parms = $_; my $ra = $sth->execute(@$bind_parms); # $ra is zero # records are still in the db # I need to keep a count of how many rows are going to be deleted, for + each delete statement $count[$i] += $sth->rows; # returns zero } $dbh->commit unless $skip_trans; # now records are not in db
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: rows affected inside a transaction
by gam3 (Curate) on May 14, 2008 at 03:40 UTC | |
|
Re: rows affected inside a transaction
by kyle (Abbot) on May 14, 2008 at 03:42 UTC | |
by x5150 (Acolyte) on May 14, 2008 at 18:43 UTC |