I am trying to run a query on a sqlite database in Perl. After I am through with the query I would like to check the rows. The problem I am having is that $query_handle->rows always returns -1
my $query_handle = $dbh->prepare('SELECT name FROM patient_data WHERE name = ?')
or die "Couldn't prepare statement: " . $dbh->errstr;
if ($query_handle->rows == 0) {
#DO Something
}
What am I doing wrong??? - I am assuming that if the query does not find a name $query_handle->rows would equal 0? I get -1.
Thanks in advance.