in reply to Checking return results from an execute
my $sth = $dbh->prepare($sql); # In "real" code you'd test $rv to make sure things are OK my $rv = $sth->execute(); if ($sth->rows() == 1) { # Something (fetch, etc.) } else { # Something else } [download]