From f4c451d39cb4b98e76a291f021c408b3340d2b91 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Fri, 24 Jun 2005 10:08:44 +0000 Subject: [PATCH] Bug fixed: select => select distinct (since the ors in the where patterns used to generate duplicates). --- helm/ocaml/metadata/metadataConstraints.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/ocaml/metadata/metadataConstraints.ml b/helm/ocaml/metadata/metadataConstraints.ml index 602ee49b9..74b15015c 100644 --- a/helm/ocaml/metadata/metadataConstraints.ml +++ b/helm/ocaml/metadata/metadataConstraints.ml @@ -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 -- 2.39.2