in reply to Re: Getting Record Set via DBI into an Array of Arrays
in thread Getting Record Set via DBI into an Array of Arrays
produced this:while (my $row = $sth->fetch()){ push @{ $data[0] }, $row[0]; push @{ $data[1] }, $row[1]; } print Dumper(@data);
Using$VAR1 = [ undef, undef, undef, undef, undef ]; $VAR2 = [ undef, undef, undef, undef, undef ];
produced this:while (my @row = $sth->fetchrow_array()){ push @{$data[0]}, $row[0]; push @{$data[1]}, $row[1]; } print Dumper(@data);
so the last one there is exactly what i needed! Thanks a lot.$VAR1 = [ 'Siemens', 'Ericcson', 'Nokia', 'Sony', 'Samsung' ]; $VAR2 = [ '45000', '18000', '12000', '11000', '8000' ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting Record Set via DBI into an Array of Arrays
by ikegami (Patriarch) on Apr 13, 2009 at 13:44 UTC |