The following module was proposed for inclusion in the Module List:

  modid:       DBIx::Lookup::Field
  DSLIP:       Rdpfp
  description: Create a lookup hash from a database table
  userid:      MARCEL (Marcel Grunauer)
  chapterid:    7 (Database_Interfaces)
  communities:
    comp.lang.perl.modules

  similar:

  rationale:

    SYNOPSIS use DBI; use DBIx::Lookup::Field qw/dbi_lookup_field/;

    $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.

  enteredby:   MARCEL (Marcel Grunauer)
  enteredon:   Sat May 19 11:33:39 2001 GMT

The resulting entry would be:

DBIx::Lookup::
::Field           Rdpfp Create a lookup hash from a database table   MARCEL


Thanks for registering,
The Pause Team

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=86000000_503f8ba70ebe4473&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=86000000_503f8ba70ebe4473&SUBMIT_pause99_add_mod_insertit=1

Reply via email to