CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[42S22]: Column not found: 1054 Unknown column '316395X33X803' in 'where clause'. The SQL statement executed was: SELECT COUNT(*) FROM `survey_316395` `t` WHERE ((submitdate IS NOT NULL) AND (`316395X33X803` IS NOT NULL)) AND (`316395X33X803`=:ycp0). Bound with :ycp0='CADJUG'

/htdocs/public/enquete/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
+
 /htdocs/public/enquete/plugins/getStatInSurvey/getStatInSurvey.php(287): CActiveRecord->count(CDbCriteria)
282         $oCriteria->addCondition("{$sQuotedColumn} IS NOT NULL");
283         if(!is_null($sValue))
284         {
285             $oCriteria->compare($sQuotedColumn,$sValue);
286         }
287         $aCount[$sColumn][$sValue]=intval(SurveyDynamic::model($this->iSurveyId)->count($oCriteria));
288         return $aCount[$sColumn][$sValue];
289     }
290     /**
291      * Replace specific string by value
292      * @param : $string : the string to replace
#3
+
 /htdocs/public/enquete/plugins/getStatInSurvey/getStatInSurvey.php(159): getStatInSurvey->getCount("316395X33X803", "CADJUG")
154                         case "N":
155                         case "G":
156                         case "Y":
157                         case "*":
158                         case "S":
159                             return $this->getCount($this->iSurveyId."X".$oQuestion->gid."X".$oQuestion->qid, $sValue);
160                         default:
161                             tracevar("getStatInSurvey : Invalid question type : $sType in ".$this->sDebugWhere);
162                             return;
163                     return;
164                 case 'nbnum':
#4
+
 /htdocs/public/enquete/plugins/getStatInSurvey/getStatInSurvey.php(304): getStatInSurvey->getValue("B.nb.CADJUG")
299         if($iCount)
300         {
301             $aReplace=$aQuoteReplace=array();
302             foreach($aMatches as $sMatch)
303             {
304                 $sValue=$this->getValue($sMatch);
305                 if(null!==$sValue)
306                 {
307                     $aReplace["[".$sMatch."]"]=$sValue;
308                     if(is_numeric($sValue))
309                         $aQuoteReplace["\"[".$sMatch."]\""]=$sValue;
2017-08-21 23:09:22 Apache Yii Framework/1.1.18
Sommaire du rapport de profilage (Durée: 1.45572s, Memoire: 22,607KB)
Fonction Nb Total (s) Moy. (s) Min. (s) Max. (s)
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `survey_316395`) 1 0.00749 0.00749 0.00749 0.00749
system.db.CDbCommand.query(SHOW CREATE TABLE `survey_316395`) 1 0.00369 0.00369 0.00369 0.00369
system.db.CDbCommand.query(SELECT * FROM questions WHERE parent_qid='803' AND scale_id=0 AND language='fr' ORDER BY question_order) 1 0.00255 0.00255 0.00255 0.00255
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `tokens_316395`) 1 0.00241 0.00241 0.00241 0.00241
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `surveys`) 1 0.00186 0.00186 0.00186 0.00186
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `surveys_languagesettings`) 1 0.00163 0.00163 0.00163 0.00163
system.db.CDbCommand.query(SELECT * FROM assessments WHERE sid=316395 and language='fr' ORDER BY scope, id) 4 0.00118 0.00029 0.00018 0.00043
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `questions`) 1 0.00118 0.00118 0.00118 0.00118
system.db.CDbCommand.query(SELECT `t`.`surveyls_survey_id` AS `t0_c0`, `t`.`surveyls_language` AS `t0_c1`, `t`.`surveyls_title` AS `t0_c2`, `t`.`surveyls_description` AS `t0_c3`, `t`.`surveyls_welcometext` AS `t0_c4`, `t`.`surveyls_endtext` AS `t0_c5`, `t`.`surveyls_url` AS `t0_c6`, `t`.`surveyls_urldescription` AS `t0_c7`, `t`.`surveyls_email_invite_subj` AS `t0_c8`, `t`.`surveyls_email_invite` AS `t0_c9`, `t`.`surveyls_email_remind_subj` AS `t0_c10`, `t`.`surveyls_email_remind` AS `t0_c11`, `t`.`surveyls_email_register_subj` AS `t0_c12`, `t`.`surveyls_email_register` AS `t0_c13`, `t`.`surveyls_email_confirm_subj` AS `t0_c14`, `t`.`surveyls_email_confirm` AS `t0_c15`, `t`.`surveyls_dateformat` AS `t0_c16`, `t`.`surveyls_numberformat` AS `t0_c17`, `t`.`email_admin_notification_subj` AS `t0_c18`, `t`.`email_admin_notification` AS `t0_c19`, `t`.`email_admin_responses_subj` AS `t0_c20`, `t`.`email_admin_responses` AS `t0_c21`, `t`.`surveyls_attributecaptions` AS `t0_c22`, `t`.`attachments` AS `t0_c23`, `survey`.`sid` AS `t1_c0`, `survey`.`owner_id` AS `t1_c1`, `survey`.`admin` AS `t1_c2`, `survey`.`active` AS `t1_c3`, `survey`.`expires` AS `t1_c4`, `survey`.`startdate` AS `t1_c5`, `survey`.`adminemail` AS `t1_c6`, `survey`.`anonymized` AS `t1_c7`, `survey`.`faxto` AS `t1_c8`, `survey`.`format` AS `t1_c9`, `survey`.`savetimings` AS `t1_c10`, `survey`.`template` AS `t1_c11`, `survey`.`language` AS `t1_c12`, `survey`.`additional_languages` AS `t1_c13`, `survey`.`datestamp` AS `t1_c14`, `survey`.`usecookie` AS `t1_c15`, `survey`.`allowregister` AS `t1_c16`, `survey`.`allowsave` AS `t1_c17`, `survey`.`autonumber_start` AS `t1_c18`, `survey`.`autoredirect` AS `t1_c19`, `survey`.`allowprev` AS `t1_c20`, `survey`.`printanswers` AS `t1_c21`, `survey`.`ipaddr` AS `t1_c22`, `survey`.`refurl` AS `t1_c23`, `survey`.`datecreated` AS `t1_c24`, `survey`.`publicstatistics` AS `t1_c25`, `survey`.`publicgraphs` AS `t1_c26`, `survey`.`listpublic` AS `t1_c27`, `survey`.`htmlemail` AS `t1_c28`, `survey`.`tokenanswerspersistence` AS `t1_c29`, `survey`.`assessments` AS `t1_c30`, `survey`.`usecaptcha` AS `t1_c31`, `survey`.`usetokens` AS `t1_c32`, `survey`.`bounce_email` AS `t1_c33`, `survey`.`attributedescriptions` AS `t1_c34`, `survey`.`emailresponseto` AS `t1_c35`, `survey`.`emailnotificationto` AS `t1_c36`, `survey`.`tokenlength` AS `t1_c37`, `survey`.`showxquestions` AS `t1_c38`, `survey`.`showgroupinfo` AS `t1_c39`, `survey`.`shownoanswer` AS `t1_c40`, `survey`.`showqnumcode` AS `t1_c41`, `survey`.`bouncetime` AS `t1_c42`, `survey`.`bounceprocessing` AS `t1_c43`, `survey`.`bounceaccounttype` AS `t1_c44`, `survey`.`bounceaccounthost` AS `t1_c45`, `survey`.`bounceaccountpass` AS `t1_c46`, `survey`.`bounceaccountencryption` AS `t1_c47`, `survey`.`bounceaccountuser` AS `t1_c48`, `survey`.`showwelcome` AS `t1_c49`, `survey`.`showprogress` AS `t1_c50`, `survey`.`navigationdelay` AS `t1_c51`, `survey`.`nokeyboard` AS `t1_c52`, `survey`.`alloweditaftercompletion` AS `t1_c53`, `survey`.`googleanalyticsstyle` AS `t1_c54`, `survey`.`googleanalyticsapikey` AS `t1_c55`, `survey`.`sendconfirmation` AS `t1_c56`, `survey`.`questionindex` AS `t1_c57` FROM `surveys_languagesettings` `t` LEFT OUTER JOIN `surveys` `survey` ON (t.surveyls_survey_id = survey.sid) WHERE (`t`.`surveyls_survey_id`=316395 AND `t`.`surveyls_language`='fr')) 1 0.00117 0.00117 0.00117 0.00117
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `groups`) 1 0.00106 0.00106 0.00106 0.00106
system.db.CDbCommand.query(SELECT * FROM `questions` `t` WHERE qid=:qid LIMIT 1. Bound with :qid=803) 4 0.00106 0.00026 0.00022 0.00034
system.db.CDbCommand.query(SHOW TABLES) 1 0.00104 0.00104 0.00104 0.00104
system.db.CDbCommand.query(SELECT * FROM `question_attributes` `t` WHERE qid=:qid. Bound with :qid=803) 4 0.00104 0.00026 0.00020 0.00037
system.db.CDbCommand.query(SHOW CREATE TABLE `surveys_languagesettings`) 1 0.00100 0.00100 0.00100 0.00100
system.db.CDbCommand.query(select count(DISTINCT groups.gid) from groups left join questions on groups.gid=questions.gid where groups.sid=316395 and qid is not null) 4 0.00098 0.00024 0.00019 0.00030
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `permissions`) 1 0.00096 0.00096 0.00096 0.00096
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `question_attributes`) 1 0.00093 0.00093 0.00093 0.00093
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `plugins`) 1 0.00072 0.00072 0.00072 0.00072
system.db.CDbCommand.query(SHOW CREATE TABLE `surveys`) 1 0.00071 0.00071 0.00071 0.00071
system.db.CDbCommand.query(SELECT * FROM `tokens_316395` `t` WHERE (COALESCE(validuntil, '2017-08-21 23:09:21') >= '2017-08-21 23:09:21' AND COALESCE(validfrom, '2017-08-21 23:09:21') <= '2017-08-21 23:09:21') AND (`t`.`token`=:yp0) LIMIT 1. Bound with :yp0='cCr4b7o6BEzdZRT') 1 0.00069 0.00069 0.00069 0.00069
system.db.CDbCommand.query(SELECT * FROM `survey_316395` `t` WHERE `t`.`token`=:yp0 ORDER BY id DESC. Bound with :yp0='cCr4b7o6BEzdZRT') 1 0.00069 0.00069 0.00069 0.00069
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `settings_global`) 1 0.00069 0.00069 0.00069 0.00069
system.db.CDbCommand.query(SELECT * FROM `settings_global` `t`) 1 0.00058 0.00058 0.00058 0.00058
system.db.CDbCommand.query(SELECT * FROM `questions` `t` WHERE sid=:sid AND title=:title LIMIT 1. Bound with :sid='316395', :title='B') 1 0.00058 0.00058 0.00058 0.00058
system.db.CDbCommand.query(SELECT COUNT(*) FROM `survey_316395` `t` WHERE ((submitdate IS NOT NULL) AND (`316395X33X803` IS NOT NULL)) AND (`316395X33X803`=:ycp0). Bound with :ycp0='CADJUG') 1 0.00057 0.00057 0.00057 0.00057
system.db.CDbCommand.query(SELECT * FROM `questions` `t` WHERE `t`.`qid`=803 AND `t`.`language`='fr' LIMIT 1) 1 0.00056 0.00056 0.00056 0.00056
system.db.CDbCommand.query(SHOW FULL COLUMNS FROM `templates`) 1 0.00049 0.00049 0.00049 0.00049
system.db.CDbCommand.query(SELECT * FROM `surveys` `t` WHERE `t`.`sid`=316395 LIMIT 1) 1 0.00048 0.00048 0.00048 0.00048
system.db.CDbCommand.query(SHOW CREATE TABLE `permissions`) 1 0.00039 0.00039 0.00039 0.00039
system.db.CDbCommand.query(SHOW CREATE TABLE `tokens_316395`) 1 0.00035 0.00035 0.00035 0.00035
system.db.CDbCommand.query(SHOW CREATE TABLE `questions`) 1 0.00032 0.00032 0.00032 0.00032
system.db.CDbCommand.query(SHOW CREATE TABLE `templates`) 1 0.00032 0.00032 0.00032 0.00032
system.db.CDbCommand.query(SHOW CREATE TABLE `question_attributes`) 1 0.00030 0.00030 0.00030 0.00030
system.db.CDbCommand.query(SELECT * FROM `settings_global` `t` WHERE stg_name=:name LIMIT 1. Bound with :name='DBVersion') 1 0.00028 0.00028 0.00028 0.00028
system.db.CDbCommand.query(SELECT * FROM `tokens_316395` `t` WHERE `t`.`token`=:yp0 LIMIT 1. Bound with :yp0='cCr4b7o6BEzdZRT') 1 0.00027 0.00027 0.00027 0.00027
system.db.CDbCommand.query(SHOW CREATE TABLE `groups`) 1 0.00025 0.00025 0.00025 0.00025
system.db.CDbCommand.query(SELECT * FROM `permissions` `t` WHERE `t`.`entity_id`=:yp0 AND `t`.`entity`=:yp1 AND `t`.`uid`=:yp2 AND `t`.`permission`=:yp3 LIMIT 1. Bound with :yp0=0, :yp1='global', :yp2=2, :yp3='superadmin') 1 0.00021 0.00021 0.00021 0.00021
system.db.CDbCommand.query(SELECT * FROM `plugins` `t` WHERE `t`.`active`=:yp0. Bound with :yp0=1) 1 0.00021 0.00021 0.00021 0.00021
system.db.CDbCommand.query(SHOW CREATE TABLE `settings_global`) 1 0.00020 0.00020 0.00020 0.00020
system.db.CDbCommand.query(SHOW CREATE TABLE `plugins`) 1 0.00017 0.00017 0.00017 0.00017