##
my $stmt = "SELECT * FROM $table WHERE $key_col = ?";
my $sth = $dbhandle->prepare( $stmt );
$sth->execute($key_val);
##
##
my $ref = $sth->fetchall_arrayref();
$sth->finish();
return map { $_->[$name_col] => $_->[$val_col] } @$ref;
##
##
my $ref = $sth->fetchall_hashref([$name_col,$val_col]);
$sth->finish();
return map {@$_} @$ref;
##
##