Error when trying to download answers

Error when trying to download answers

by Albert Ramsbottom -
Number of replies: 1

MySQL version 8.0.11

Error

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rank
FROM mdl_questionnaire_response qr
JOIN mdl_que' at line 3

SELECT CONCAT_WS('_', qr.id, 'checkboxes', qrm.id) AS id,
qr.submitted, qr.complete, qr.grade, qr.userid, u.firstnamephonetic, u.lastnamephonetic, u.middlename, u.alternatename, u.firstname, u.lastname, u.username, u.department, u.institution, u.id as usrid, qr.id AS rid, qrm.question_id,
qrm.choice_id, qro.response AS response, 0 AS rank
FROM mdl_questionnaire_response qr
JOIN mdl_questionnaire_resp_multiple qrm ON qrm.response_id = qr.id

AND qr.survey_id = ? AND qr.complete = ?
LEFT JOIN mdl_questionnaire_response_other qro ON qro.response_id = qr.id AND qro.choice_id = qrm.choice_id
LEFT JOIN mdl_user u ON u.id = qr.userid

ORDER BY usrid, id
[array (
0 => '18034',
1 => 'y',
)]
Error code: dmlreadexception

I think it is the word "Rank"

Cheers

Average of ratings: -