]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/metadata/metadataConstraints.ml
Bug fixed: select => select distinct (since the ors in the where patterns
[helm.git] / helm / ocaml / metadata / metadataConstraints.ml
index 602ee49b93966cac2868be492445bc42b52441d7..74b15015ce9dc5750d7378238f0c015faad19888 100644 (file)
@@ -156,10 +156,10 @@ let exec ~(dbd:Mysql.dbd) ?rating (n,from,where) =
   let where = String.concat " and " where in
   let query =
     match rating with
-    | None -> sprintf "select table0.source from %s where %s" from where
+    | None -> sprintf "select distinct table0.source from %s where %s" from where
     | Some `Hits ->
         sprintf
-          ("select table0.source from %s, hits where %s
+          ("select distinct table0.source from %s, hits where %s
             and table0.source = hits.source order by hits.no desc")
           from where 
   in