$sth = $dbh->prepare("SELECT * FROM table"); if($sth->execute()){ printf "Executed Statement - returned (%s) rows\n", $sth->rows; }