From: scyrma Date: Fri, 25 Jan 2008 02:32:04 +0000 (+0000) Subject: MDL-12565 - add AS to prevent problem with pgsql X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dbf8c19cc52b46456abd6e5274929959f820d9a6;p=moodle.git MDL-12565 - add AS to prevent problem with pgsql --- diff --git a/tag/lib.php b/tag/lib.php index 029026afd7..788c49e25a 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -842,7 +842,7 @@ function cache_correlated_tags($tag_name_or_id, $min_correlation=2) { // query that counts how many times any tag appears together in items // with the tag passed as argument ($tag_id) - $query = "SELECT tb.tagid , COUNT(*) nr + $query = "SELECT tb.tagid , COUNT(*) AS nr FROM {$CFG->prefix}tag_instance ta INNER JOIN {$CFG->prefix}tag_instance tb ON ta.itemid = tb.itemid WHERE ta.tagid = {$tag_id} AND tb.tagid != {$tag_id}