merged fix for MDL_7112 select distinct on text fields

This commit is contained in:
toyomoyo
2006-11-02 02:10:53 +00:00
parent 82749af726
commit 0b9873f2a5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -25,7 +25,7 @@
if (empty($contentlist)) {
// We look for text field contents only, and only if the field has
// autolink enabled (param1).
$sql = 'SELECT DISTINCT(dc.id) AS contentid, ' .
$sql = 'SELECT dc.id AS contentid, ' .
'dr.id AS recordid, ' .
'dc.content AS content, ' .
'd.id AS dataid ' .
+2 -2
View File
@@ -1157,7 +1157,7 @@ function forum_get_readable_forums($userid, $courseid=0) {
$selecthidden = '';
}
$selectforums = "SELECT DISTINCT(f.id) AS id,
$selectforums = "SELECT f.id AS id,
f.name AS name,
f.type AS type,
f.course AS course,
@@ -2907,7 +2907,7 @@ function forum_user_has_posted_discussion($forumid, $userid) {
function forum_discussions_user_has_posted_in($forumid, $userid) {
global $CFG;
$haspostedsql = "SELECT DISTINCT(d.id) AS id,
$haspostedsql = "SELECT d.id AS id,
d.*
FROM {$CFG->prefix}forum_posts p,
{$CFG->prefix}forum_discussions d