[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Fri May 9 14:20:19 UTC 2003
mwilkinson
Fri May 9 10:20:19 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv8092/Perl/MOBY
Modified Files:
Central.pm
Log Message:
test keyword search
moby-live/Perl/MOBY Central.pm,1.60,1.61
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/05/09 14:17:47 1.60
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm 2003/05/09 14:20:19 1.61
@@ -1714,12 +1714,12 @@
foreach my $kw(@{$findme{keywords}}){
$debug && &_LOG("KEYWORD $kw\n");
$kw =~ s/\*//g;
- $searchstring .= " OR description like '%$kw%' ";
+ $kw = $dbh->quote("%$kw%");
+ $searchstring .= " OR description like $kw ";
}
$searchstring =~ s/OR//; # just the first one
$debug && &_LOG("search $searchstring\n");
- my $search = $dbh->quote($searchstring);
my $ids = $dbh->selectall_arrayref("select service_instance_id from service_instance where $search");
unless (scalar @{$ids}){
$debug && &_LOG("found no ids @{$ids}!\nselect service_instance_id from service_instance where $search\n");
More information about the MOBY-guts
mailing list