[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.348, Wed Aug 17 03:15:01 2005 UTC revision 1.349, Fri Aug 19 19:52:19 2005 UTC
# Line 7558  Line 7558 
7558   # so I am going to do it in two stages.   # so I am going to do it in two stages.
7559   #if ($key && $val) {$sql .= " WHERE ( tag = \'$key\' and val = \'$val\' )"}   #if ($key && $val) {$sql .= " WHERE ( tag = \'$key\' and val = \'$val\' )"}
7560    
7561   if ($key) {$sql .= " WHERE tag = \'".uc($key)."\'"}   if ($key && $val) {$sql .= " WHERE (tag = \'$key\' and val = \'$val\')"}
7562     elsif ($key) {$sql .= " WHERE tag = \'".$key."\'"}
7563   elsif ($val) {$sql .= " WHERE val = \'$val\'"}   elsif ($val) {$sql .= " WHERE val = \'$val\'"}
7564     else
7565     {
7566      # neither key nor value requested
7567      warn("neither key nor value sent to get_key_value");
7568      return();
7569     }
7570    
7571    
7572   my $rdbH = $self->db_handle;   my $rdbH = $self->db_handle;
7573   my $relational_db_response=$rdbH->SQL($sql);   my $relational_db_response=$rdbH->SQL($sql);
7574    
7575   my @results;   my @results;
7576   foreach my $res (@$relational_db_response) {   map {push @results, $_->[0]} @$relational_db_response;
   if (lc($res->[1]) eq lc($key) && lc($res->[2]) eq lc($val)) {push @results, $res->[0]}  
  }  
   
7577   return @results;   return @results;
7578  }  }
7579    

Legend:
Removed from v.1.348  
changed lines
  Added in v.1.349

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3