- Posts: 20
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
SELECT tblExample.tid, Sum(tblExample.thanks) AS SumThanks FROM lime_tokens_111111 INNER JOIN tblExample ON lime_tokens_111111.tid = tblExample.tid GROUP BY tblExample.tid, lime_tokens_111111.token HAVING (((lime_tokens_111111.token.token) Like '{TOKEN:TOKEN}'));
public function beforeSurveyPage() { $questionId="123X45X67"; // SGQA style $oEvent=$this->getEvent(); $iSurveyId=$oEvent->get('surveyId'); $sessionSurvey=Yii::app()->session["survey_{$iSurveyId}"]; if($sessionSurvey && empty($sessionSurvey[$questionId]) && !empty($sessionSurvey['token']))) { $sessionSurvey[$questionId]=$this->callFuction($sessionSurvey['token']); Yii::app()->session["survey_{$iSurveyId}"]=$sessionSurvey; } } private function callFuction($sToken) { // Here the best is to create a new connexion DB with Yii and use Yii to find the information // But i think Yii can accept another method // See https://gitlab.com/Shnoulle-LimeSurvey-plugin/authWPbyDB/blob/master/AuthWPbyDB.php#L193 for an example }