Help for this page

Select Code to Download


  1. or download this
    #fetch the rows into an array reference
    my %rethash;
    while (my @row = $sth->fetchrow_array){  
        # for a multicolumn query, the 1st column becomes the hash key
        push @{$rethash{shift(@row)}}, @row;
    }