From: stronk7 Date: Wed, 6 May 2009 17:25:26 +0000 (+0000) Subject: MDL-14463 search/order - make it cross-db + delete unused column from query ; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=aa4c6b68b51386b5a1916f7efaf9dff583480322;p=moodle.git MDL-14463 search/order - make it cross-db + delete unused column from query ; merged from 19_STABLE --- diff --git a/mod/data/view.php b/mod/data/view.php index 3be4028d10..82767689ae 100755 --- a/mod/data/view.php +++ b/mod/data/view.php @@ -507,7 +507,7 @@ $sortcontent = $sortfield->get_sort_field(); $sortcontentfull = $sortfield->get_sort_sql('c.'.$sortcontent); - $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, c.'.$sortcontent.', '.$sortcontentfull.' AS _order '; + $what = ' DISTINCT r.id, r.approved, r.timecreated, r.timemodified, r.userid, u.firstname, u.lastname, '.$DB->sql_compare_text($sortcontentfull).' AS _order '; $count = ' COUNT(DISTINCT c.recordid) '; $tables = '{data_content} c, {data_records} r, {data_content} cs, {user} u '; $where = 'WHERE c.recordid = r.id