Help for this page

Select Code to Download


  1. or download this
    my $all = $dbh->selectall_arrayref("
        SELECT ID, col1, col2
    ...
    ");
    
    print "Number of rows selected: ", 0+@$all, "\n";
    
  2. or download this
    my ($count) = $dbh->selectrow_array("
        SELECT COUNT(*)
    ...
    ");
    
    print "Number of rows selected: $count\n";