CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'groups WHERE questions.gid=groups.gid AND questions.sid=855596 AND questions.l' at line 1. The SQL statement executed was: SELECT * FROM lime_questions as questions, lime_groups as groups WHERE questions.gid=groups.gid AND questions.sid=855596 AND questions.language='ru' AND questions.parent_qid=0 AND groups.language='ru' ORDER BY group_order, question_order

/home/cecnieto/public_html/encuestas.cecinasnieto.com/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

#1
+
 /home/cecnieto/public_html/encuestas.cecinasnieto.com/application/helpers/common_helper.php(1926): CDbCommand->queryAll()
1921     if ($questionid!==false)
1922     {
1923         $aquery.=" and questions.qid={$questionid} ";
1924     }
1925     $aquery.=" ORDER BY group_order, question_order";
1926     $aresult = Yii::app()->db->createCommand($aquery)->queryAll();
1927     $questionSeq=-1; // this is incremental question sequence across all groups
1928     $groupSeq=-1;
1929     $_groupOrder=-1;
1930 
1931     foreach ($aresult as $arow) //With each question, create the appropriate field(s))
#2
+
 /home/cecnieto/public_html/encuestas.cecinasnieto.com/application/helpers/frontend_helper.php(1285): createFieldMap("855596", "full", true, false, ...)
1280     {
1281         $_SESSION['survey_'.$surveyid]['insertarray'][]= "token";
1282     }
1283 
1284     $qtypes=getQuestionTypeList('','array');
1285     $fieldmap=createFieldMap($surveyid,'full',true,false,$_SESSION['survey_'.$surveyid]['s_lang']);
1286 
1287 
1288     // Randomization groups for groups
1289     $aRandomGroups=array();
1290     $aGIDCompleteMap=array();
#3
+
 /home/cecnieto/public_html/encuestas.cecinasnieto.com/application/helpers/SurveyRuntimeHelper.php(251): buildsurveysession("855596")
246         else
247         {
248             //RUN THIS IF THIS IS THE FIRST TIME , OR THE FIRST PAGE ########################################
249             if (!isset($_SESSION[$LEMsessid]['step']))
250             {
251                 buildsurveysession($surveyid);
252                 $sTemplatePath = $_SESSION[$LEMsessid]['templatepath'];
253 
254                 if($surveyid != LimeExpressionManager::getLEMsurveyId())
255                     LimeExpressionManager::SetDirtyFlag();
256 
2024-03-29 15:25:45 Apache Yii Framework/1.1.16