NAME DBIx::Lookup::Field - Create a lookup hash from a database
table VERSION version 1.100850 SYNOPSIS use DBI; use
DBIx::Lookup::Field qw(dbi_lookup_field); my $dbh =
DBI->connect('...', '...', '...'); my $inst_id =
dbi_lookup_field( DBH => $dbh, TABLE => 'institution', KEY =>
'name', VALUE => 'id', ); print "Inst_A has id ",
$inst_id->{Inst_A}; DESCRIPTION This module provides a way to
construct a hash from a database table. This is useful for the
situation where you have to perform many lookups of a field by
using a key from the same table. If, for example, a table has an
id field and a name field and you often have to look up the name
by its id, it might be wasteful to issue many separate SQL
queries. Having the two fields as a hash speeds up processing,
although at the expense of memory. The functions can be exported
individually or with the ":all" tag. FUNCTIONS
dbi_lookup_field() This function creates a hash from two fields
in a database table on a DBI connection. One field acts as the
hash key, the o