in reply to Re^4: Generating a Hash of Hashes Recursively to Display Database Hierarchy
in thread Generating a Hash of Hashes Recursively to Display Database Hierarchy
With the top:
while (my $row = $sth->fetch()) { for (1..$#$row) { my ($parent_id, $id) = @{$row}[$i-1, $i-0]; last if !defined($id); ... } }
With the bottom:
while (my $row = $sth->fetch()) { my ($parent_id, $id) = @$row; ... }
|
|---|