CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42601]: Syntax error: 7 ERREUR: erreur de syntaxe sur ou près de « = »
LINE 1: ...ROM "lime_questions" "t" WHERE sid = 113612 and `type` = ':'
^. The SQL statement executed was: SELECT * FROM "lime_questions" "t" WHERE sid = :sid and `type` = :type

/media/shnoulle/data/webdev/pgsql/vendor/yiisoft/yii/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#2
+
 /media/shnoulle/data/webdev/pgsql/application/models/LSActiveRecord.php(77): CActiveRecord->query()
72      * @since 1.1.7
73      */
74     protected function query($criteria, $all = false, $asAR = true)
75     {
76         if ($asAR === true) {
77             return parent::query($criteria, $all);
78         } else {
79             $this->beforeFind();
80             $this->applyScopes($criteria);
81             if (!$all) {
82                 $criteria->limit = 1;
#4
+
 /media/shnoulle/data/webdev/pgsql/application/controllers/admin/Statistics.php(688): CActiveRecord->findAll()
683 
684         // 1: Get list of questions from survey
685         $rows = Question::model()->primary()->getQuestionList($surveyid);
686         ;
687 
688         $rawQuestions = Question::model()->findAll("sid = :sid and `type` = :type", [
689             ":sid" => $surveyid,
690             ":type" => Question::QT_COLON_ARRAY_NUMBERS
691         ]);
692 
693         $questions = [];
#7
+
 /media/shnoulle/data/webdev/pgsql/application/core/SurveyCommonAction.php(83): CAction->runWithParamsInternal()
78             $oMethod = new ReflectionMethod($this, $sDefault);
79         }
80 
81         // We're all good to go, let's execute it
82         // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
83         return parent::runWithParamsInternal($this, $oMethod, $params);
84     }
85 
86     /**
87      * Some functions have different parameters, which are just an alias of the
88      * usual parameters we're getting in the url. This function just populates
2024-08-23 16:58:06 nginx/1.22.1 Yii Framework/1.1.29