Commit 8e683758 authored by sylvieg's avatar sylvieg

mysql doesn't like a space between the function max and the parameter : ex:...

mysql doesn't like a space between the function max and the parameter : ex: max (col) must be max(col) with the backquotes
parent 6d950c8b
......@@ -576,7 +576,7 @@ class TikiLib {
$quizName = $this->getOne("select `name` from `tiki_quizzes` where `quizId`=$quizId");
$timesTaken = $this->getOne("select count(*) from `tiki_user_quizzes` where `quizId`=$quizId");
$avgpoints = $this->getOne("select avg(`points`) from `tiki_user_quizzes` where `quizId`=$quizId");
$maxPoints = $this->getOne("select max (`maxPoints`) from `tiki_user_quizzes` where `quizId`=$quizId");
$maxPoints = $this->getOne("select max(`maxPoints`) from `tiki_user_quizzes` where `quizId`=$quizId");
$avgavg = ($maxPoints!=0) ? $avgpoints/$maxPoints*100 : 0.0;
$avgtime = $this->getOne("select avg(`timeTaken`) from `tiki_user_quizzes` where `quizId`=$quizId");
$query2 = "replace into `tiki_quiz_stats_sum`(`quizId`,`quizName`,`timesTaken`,`avgpoints`,`avgtime`,`avgavg`)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment