in reply to Number of rows affected by an update command
From the DBI docs:
The default "do" method is logically similar to: sub do { my ($dbh, $statement, $attr, @bind_values) = @_; my $sth = $dbh->prepare ($statement, $attr) or return undef; $sth->execute (@bind_values) or return undef; my $rows = $sth->rows; ($rows == 0) ? "0E0" : $rows; # always return true if no error } # do
Note the word logically in there. I'm not sure if all DBD drivers follow this exactly as documented. You might try to see if changing the do () to above sequence changes the returned expectation. If it does, please inform the DBD author at hand that the return code from do () is not as documented by the DBI.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Number of rows affected by an update command
by Anonymous Monk on Nov 03, 2010 at 20:48 UTC | |
by Tux (Canon) on Nov 04, 2010 at 07:36 UTC |