- or download this
my $sth = $dbh->prepare("
SELECT COUNT(DISTINCT all_id) AS cnt
...
$sth->execute();
my $count = $sth->fetchrow_hashref()->{cnt};
$sth->finish();
- or download this
my $sth = $dbh->prepare("
SELECT COUNT(DISTINCT all_id)
...
$sth->execute();
my $count = $sth->fetchrow_array();
$sth->finish();
- or download this
my $count = $dbh->selectrow_array("
SELECT COUNT(DISTINCT all_id)
FROM users
");