On Sun, Nov 16, 2003 at 10:11:47AM +0000, Tim Bunce wrote: > On Sat, Nov 15, 2003 at 08:48:50AM -0800, Terrence Brannon wrote: > > Is there anyway to flatten the results of selectall_hashref ? Here is > > what I had to do in my sub: > > > > sub clans { > > > > my $clan_list = $dbh->selectall_hashref($SQL, 'id'); > > > > # the "flattening" that I was hoping DBI could do somehow :) > > my @ret; > > for my $id (sort keys %$clan_list) { > > push @ret, $clan_list->{$id}; > > } > > [EMAIL PROTECTED]; > > } > > selectcol_* > > > Also, do you think that DBI should throw a warning or exception if the > > attribute FetchHashAsRowKey is set to something other than NAME or NAME_lc? > > > > I caught a bit of hell last night because I accidentally set it to 0. > > A warning if it's false seems reasonable >> todo.
Umm, looking at the code there's already an error if the value of the attribute named by the FetchHashKeyName attribute is not an array ref: Can't use attribute '%s' because it doesn't contain a reference to an array (%s) Can you show me a test case that demonstrates the problem? Tim.