- Posts: 4
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
$command = Yii::app()->db->createCommand() ->select("{{questions}}.qid,{{groups}}.group_order, {{questions}}.question_order") ->from($questionTable) ->where("({{questions}}.sid = :sid AND {{questions}}.parent_qid = 0)") ->join('{{groups}}', "{{groups}}.gid = {{questions}}.gid") ->order("{{groups}}.group_order asc, {{questions}}.question_order asc") ->bindParam(":sid", $iSurvey, PDO::PARAM_INT); $allQuestions = $command->query()->readAll();
Please Log in to join the conversation.
$api = new LimesurveyApi(); $lang = $api->getCurrentUser()['lang']; $questions = $api->getQuestions($surveyId, $lang, ['gid' => $groupId]); $questionIds = []; foreach ($questions as $question) { $questionIds[] = $question['qid']; }
Please Log in to join the conversation.