From eafa83ef9d5f8b82a0097ccf8c83f5f45050bb84 Mon Sep 17 00:00:00 2001 From: scyrma Date: Mon, 23 Jun 2008 04:31:41 +0000 Subject: [PATCH] MDL-15345: prevent problem while running tag_compute_correlations under pgsql. (merge from 1.9) --- tag/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag/lib.php b/tag/lib.php index 5450d821fe..14c9a26efc 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -786,7 +786,7 @@ function tag_compute_correlations($min_correlation=2) { WHERE ta.tagid = ? AND tb.tagid <> ? GROUP BY tb.tagid HAVING nr > ? - ORDER BY nr DESC"; + ORDER BY COUNT(*) DESC"; $params = array($tag->id, $tag->id, $min_correlation); $correlated = array(); -- 2.39.5