# oops... while ( my $row = $sth1->fetchrow_arrayref() ) { my $calc_rank = $row->{ranker1} + $row->{ranker2}; %ranked{ $row->{studentid} } = $calc_rank; } # should actually read while ( my $row = $sth1->fetchrow_arrayref() ) { my $calc_rank = $row->[1] + $row->[2]; %ranked{ $row->[0] } = $calc_rank; }
In reply to Re: Re: What's an Efficient Way to Retrieve a Rank from a MySQL Table?
by Anonymous Monk
in thread What's an Efficient Way to Retrieve a Rank from a MySQL Table?
by soon_j
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |