From 4aa803743695ed6448c9d8458291c077bd0875b3 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 11 Aug 2007 22:58:17 +0000 Subject: [PATCH] Finally, the parenthesis were causing problems too. MDL-10808 --- question/upgrade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/question/upgrade.php b/question/upgrade.php index 6b04a82bcc..295ae596d8 100644 --- a/question/upgrade.php +++ b/question/upgrade.php @@ -103,8 +103,8 @@ function question_delete_unused_random(){ $result = true; //delete all 'random' questions that are not been used in a quiz. if ($qqis = get_records_sql("SELECT q.* FROM {$CFG->prefix}question q LEFT JOIN ". - "({$CFG->prefix}quiz_question_instances qqi) ". - "ON (q.id = qqi.question) WHERE q.qtype='random' AND qqi.question IS NULL")){ + "{$CFG->prefix}quiz_question_instances qqi ". + "ON q.id = qqi.question WHERE q.qtype='random' AND qqi.question IS NULL")){ $qqilist = join(array_keys($qqis), ','); $result = $result && delete_records_select('question', "id IN ($qqilist)"); } -- 2.39.5