in reply to I need to tell what I pulled from SQL
my $sth = $dbh->prepare( "SELECT * FROM poll WHERE status='waiting' ORDER BY `id` ASC LIMIT 0, 5" ); my $query_count = $sth->execute or die $dbh->errstr; if ( $query_count == 1 ) { # you *can* pull one but just one row using one of the # fetch* methods } else { # your condition isn't met }
|
---|