]> git.donarmstrong.com Git - infobot.git/blobdiff - src/db_mysql.pl
- berkeley dbm support now works! thanks to tim riker.
[infobot.git] / src / db_mysql.pl
index 266dd69f07eb534f4209f20309d8165054e0e6cd..559ac2d2dca8cb2553f87cb313b76e42e3aa56b6 100644 (file)
@@ -465,12 +465,14 @@ sub searchTable {
     }
 
     $str =~ s/\_/\\_/g;
-    $str =~ s/\?/\_/g; # '.' should be supported, too.
+    $str =~ s/\?/_/g;  # '.' should be supported, too.
+    $str =~ s/\*/%/g;  # for mysql.
     # end of string fix.
 
     my $query = "SELECT $select FROM $table WHERE $key LIKE ". 
                &dbQuote($str);
     my $sth = $dbh->prepare($query);
+    &DEBUG("query => '$query'.");
     &SQLDebug($query);
     if (!$sth->execute) {
        &WARN("Search($query)");