MDL-48108 message: Use sql_concat instead of sql_concat_join

This commit is contained in:
Andrew Nicols 2015-02-25 14:11:19 +08:00 committed by David Monllao
parent cf2927ba4d
commit 3d9c8578f7

View File

@ -708,7 +708,7 @@ function message_get_recent_conversations($user, $limitfrom=0, $limitto=100) {
// There is a separate query for read and unread messages as they are stored
// in different tables. They were originally retrieved in one query but it
// was so large that it was difficult to be confident in its correctness.
$uniquefield = $DB->sql_concat_join("'-'", array('message.useridfrom', 'message.useridto'));
$uniquefield = $DB->sql_concat('message.useridfrom', "'-'", 'message.useridto');
$sql = "SELECT $uniquefield, $userfields,
message.id as mid, message.notification, message.smallmessage, message.fullmessage,
message.fullmessagehtml, message.fullmessageformat, message.timecreated,