From 046796c383cb2880f40dcc0b5728ff3f9cfa725b Mon Sep 17 00:00:00 2001 From: Matthew Wilson Date: Fri, 12 May 2006 15:07:44 +0000 Subject: [PATCH] probably better order this thing. --- lib/WebGUI/SQL.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index 145e2e90d..ddb73b6e3 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -252,14 +252,15 @@ Which column of the result set to use as the key when creating the hashref. =cut sub buildHashRefOfHashRefs { - my $hashRef; + my %hash; my $sth = $_[0]->read($_[1],$_[2]); my $data; + tie %hash, "Tie::IxHash"; while ($data = $sth->hashRef) { - $hashRef->{$data->{$_[3]}} = $data; + $hash{$data->{$_[3]}} = $data; } $sth->finish; - return $hashRef; + return \%hash; }