Help for this page

Select Code to Download


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