Skip to content

Commit

Permalink
Fixed issue #17864: Regenerate questions codes returns CDbCommand fai…
Browse files Browse the repository at this point in the history
…led to execute the SQL statement: Incorrect syntax near the keyword 'group' (#2344)
  • Loading branch information
gabrieljenik committed Apr 27, 2022
1 parent 1c677f7 commit abe8543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/controllers/SurveyAdministrationController.php
Expand Up @@ -325,12 +325,12 @@ public function actionRegenerateQuestionCodes()
$iGroupNumber = 0;
$iGroupSequence = 0;
$oQuestions = Question::model()
->with(['group', 'questionl10ns'])
->with(['group' => ['alias' => 'g'], 'questionl10ns'])
->findAll(
array(
'select' => 't.qid,t.gid',
'condition' => "t.sid=:sid and questionl10ns.language=:language and parent_qid=0",
'order' => 'group.group_order, question_order',
'order' => 'g.group_order, question_order',
'params' => array(':sid' => $iSurveyID, ':language' => $oSurvey->language)
)
);
Expand Down

0 comments on commit abe8543

Please sign in to comment.