> From: raptor
> I want a litle more extended sytax for selectall_hashref(),
> or if u can
> tell
> me how the achieve this :
>
> my $Query = qq{SELECT field1, field2, field3};
> my $res = $dbh->selectall_hashref($Query, {field1=>1,
> field2=>1}, %attr)
> so as a result i get the following HoH :
>
> $$res{field1}{field2} = $field3;
You're going to have to do this yourself in a fetch loop
(unless you supply the patches to Tim yourself :)
E.g.:
my $sth = $dbh->prepare($Query);
$sth->bind_columns(\my ($field1, $field2, $field3));
my %res;
while ($sth->fetch) {
$res{$field1}{$field2} = $field3;
}
HTH,
Douglas Wilson