CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lime_survey_21816.token' in 'where clause'. The SQL statement executed was: SELECT id,submitdate,lastpage FROM lime_survey_21816 WHERE lime_survey_21816.token='uba8c8dc55aaih3' order by id desc

D:\web\xampp\htdocs\limesurvey\framework\db\CDbCommand.php(528)

516             return $result;
517         }
518         catch(Exception $e)
519         {
520             if($this->_connection->enableProfiling)
521                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
522             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
523             $message = $e->getMessage();
524             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
525                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
526             if(YII_DEBUG)
527                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
528             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
529                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
530         }
531     }
532 
533     /**
534      * Builds a SQL SELECT statement from the given query specification.
535      * @param array $query the query specification in name-value pairs. The following
536      * query options are supported: {@link select}, {@link distinct}, {@link from},
537      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
538      * {@link limit}, {@link offset} and {@link union}.
539      * @return string the SQL statement
540      * @since 1.1.6

Stack Trace

#1
+
 D:\web\xampp\htdocs\limesurvey\application\controllers\survey\index.php(607): CDbCommand->queryRow()
602 
603         if (!isset($_SESSION['survey_'.$surveyid]['srid']) && $thissurvey['anonymized'] == "N" && $thissurvey['active'] == "Y" && isset($token) && $token !='')
604         {
605             // load previous answers if any (dataentry with nosubmit)
606             $sQuery="SELECT id,submitdate,lastpage FROM {$thissurvey['tablename']} WHERE {$thissurvey['tablename']}.token='{$token}' order by id desc";
607             $aRow = Yii::app()->db->createCommand($sQuery)->queryRow();
608             if ( $aRow )
609             {
610                 if(($aRow['submitdate']==''  && $thissurvey['tokenanswerspersistence'] == 'Y' )|| ($aRow['submitdate']!='' && $thissurvey['alloweditaftercompletion'] == 'Y'))
611                 {
612                     $_SESSION['survey_'.$surveyid]['srid'] = $aRow['id'];
#2
+
 D:\web\xampp\htdocs\limesurvey\application\controllers\survey\index.php(18): index->action()
13 
14 class index extends CAction {
15 
16     public function run()
17     {
18         $this->action();
19     }
20 
21     function action()
22     {
23         global $surveyid;
#10
+
 D:\web\xampp\htdocs\limesurvey\index.php(178): CApplication->run()
173  *
174  */
175 require_once BASEPATH . 'yii' . EXT;
176 require_once APPPATH . 'core/LSYii_Application' . EXT;
177 
178 Yii::createApplication('LSYii_Application', APPPATH . 'config/config' . EXT)->run();
179 
180 /* End of file index.php */
181 /* Location: ./index.php */
2012-10-25 14:25:04 Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Yii Framework/1.1.10