- or download this
"rows"
$rv = $sth->rows;
...
One alternative method to get a row count for a "SELECT" is
+ to exe-
cute a "SELECT COUNT(*) FROM ..." SQL statement with the sa
+me "..."
as your query and then fetch the row count from that.
- or download this
my $sql = {
SELECT count(*)
...
my $sth = $dbh->prepare($sql);
$sth->execute($name);
my ($count_rows) = $sth->fetchrow_array();
- or download this
my $sql = {
SELECT name
...
### do something with $name here ###
$count_rows += 1;
}