my $sql = <<EOT SELECT col1, col2 FROM table.... EOT my $sth = $dbh->prepare($sql); $sth->execute(); $sth->bind_columns(\my ($col1, $col2)); my %data; while ($sth->fetch) { push @{$data{$col1}}, $col2; }
In reply to Re^2: DBI with hash of arrays
by runrig
in thread DBI with hash of arrays
by pipeops
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |