Re: hash slices

2006-09-28 Thread Rob Dixon
Gerald Host wrote: > > Rob Dixon wrote: > >> You don't want to use selectall_hashref because, as is the nature of hashes, >> the key must be unique, which means the database table's key field that >> provides it must also be unique. If you get this working, you will retrieve a >> single record for

Re: hash slices

2006-09-28 Thread John W. Krahn
Gerald Host wrote: > I'm using DBI's selectall_hashref with 5 key columns. I want to display > each row where key col 1 is 'yes' or NULL (undef or '' ?) > > > foreach my $medCategory (keys %{$href->{'yes'}->{qw('' 'yes')}->{qw('' > 'yes')}}) { > foreach my $med (keys %{$href->{qw('yes')}->{

Re: hash slices

2006-09-28 Thread Gerald Host
Ryan/Gerald (!) (Ryan) You don't want to use selectall_hashref because, as is the nature of hashes, the key must be unique, which means the database table's key field that provides it must also be unique. If you get this working, you will retrieve a single record for each possible value of

Re: hash slices

2006-09-28 Thread Rob Dixon
Gerald Host wrote: > > I'm using DBI's selectall_hashref with 5 key columns. I want to display > each row where key col 1 is 'yes' or NULL (undef or '' ?) > > > foreach my $medCategory (keys %{$href->{'yes'}->{qw('' 'yes')}->{qw('' 'yes')}}) { > foreach my $med (keys %{$href->{qw('yes')}->{qw(