UPDATE: The problem was found - that $sth->execute() returns -1 on a deadlock, which is boolean true and so the fetchrow_hashref() runs. We need to check for a return code less than zero.my $sth = $db->{ 'dbh' }->prepare( $sql ); if ( $sth->execute() ) { my @rows = (); while ( my $ref = $sth->fetchrow_hashref() ) { push @rows, $ref; } return @rows; }
In reply to fetchrow_hashref failed problem by dcunningham
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |