]> git.donarmstrong.com Git - infobot.git/blobdiff - src/dbi.pl
factstats author
[infobot.git] / src / dbi.pl
index e0f48c4741c7053b47acb74b9ae1b75861533f64..f10845a2b59cfa0648456f1e4655d5ca671fba40 100644 (file)
@@ -88,9 +88,10 @@ sub sqlSelectMany {
        return;
     }
 
+    $query .= " WHERE " if (($where_href) || ($other));
     if ($where_href) {
        my $where = &hashref2where($where_href);
-       $query .= " WHERE $where" if ($where);
+       $query .= "$where" if ($where);
     }
     $query .= " $other"                if $other;