CDbException

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'showxquestions' at row 1. The SQL statement executed was: INSERT INTO `lime_surveys_groupsettings` (`anonymized`, `savetimings`, `template`, `datestamp`, `usecookie`, `allowregister`, `allowsave`, `autonumber_start`, `autoredirect`, `allowprev`, `printanswers`, `ipaddr`, `refurl`, `showsurveypolicynotice`, `publicstatistics`, `publicgraphs`, `listpublic`, `htmlemail`, `sendconfirmation`, `tokenanswerspersistence`, `assessments`, `usecaptcha`, `tokenlength`, `showxquestions`, `showgroupinfo`, `shownoanswer`, `showqnumcode`, `showwelcome`, `showprogress`, `questionindex`, `navigationdelay`, `nokeyboard`, `alloweditaftercompletion`, `owner_id`, `format`, `admin`, `adminemail`, `gsid`, `bounce_email`, `attributedescriptions`, `emailresponseto`, `emailnotificationto`) VALUES (:anonymized, :savetimings, :template, :datestamp, :usecookie, :allowregister, :allowsave, :autonumber_start, :autoredirect, :allowprev, :printanswers, :ipaddr, :refurl, :showsurveypolicynotice, :publicstatistics, :publicgraphs, :listpublic, :htmlemail, :sendconfirmation, :tokenanswerspersistence, :assessments, :usecaptcha, :tokenlength, :showxquestions, :showgroupinfo, :shownoanswer, :showqnumcode, :showwelcome, :showprogress, :questionindex, :navigationdelay, :nokeyboard, :alloweditaftercompletion, :owner_id, :format, :admin, :adminemail, :gsid, :bounce_email, :attributedescriptions, :emailresponseto, :emailnotificationto)

/mnt/data/shnoulle/nginx/www/develop/framework/db/CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#1
+
 /mnt/data/shnoulle/nginx/www/develop/application/helpers/update/updatedb_helper.php(2980): CDbCommand->insert("{{surveys_groupsettings}}", array("anonymized" => "N", "savetimings" => "N", "template" => "fruity", "datestamp" => "N", ...))
2975     // set db values to model
2976     $settings1->showqnumcode = (empty($globalSetting1->stg_value) || $globalSetting1->stg_value == 'choose') ? 'none' : $globalSetting1->stg_value;
2977     $settings1->showgroupinfo = (empty($globalSetting2->stg_value) ||$globalSetting2->stg_value == 'choose') ? 'both' : $globalSetting2->stg_value;
2978     $settings1->shownoanswer = (empty($globalSetting3->stg_value) ||$globalSetting3->stg_value == '2') ? '1' : $globalSetting3->stg_value;
2979     $settings1->showxquestions = (empty($globalSetting4->stg_value) ||$globalSetting4->stg_value == 'choose') ? 'show' : $globalSetting4->stg_value;
2980     $oDB->createCommand()->insert("{{surveys_groupsettings}}", $settings1->attributes);
2981 
2982     // insert settings for default survey group
2983     $settings2 = new SurveysGroupsettings;
2984     $settings2->setToInherit();
2985     $settings2->gsid = 1;
#2
+
 /mnt/data/shnoulle/nginx/www/develop/application/helpers/update/updatedb_helper.php(2496): createSurveysGroupSettingsTable(DbConnection)
2491         /**
2492          * Add sureys_groupsettings table and update settings_global table 
2493          */
2494         if ($iOldDBVersion < 404) {
2495             $oTransaction = $oDB->beginTransaction();
2496             createSurveysGroupSettingsTable($oDB);
2497             $oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>404),"stg_name='DBVersion'");
2498             $oTransaction->commit();
2499         }
2500       
2501     } catch (Exception $e) {
#3
+
 /mnt/data/shnoulle/nginx/www/develop/application/controllers/AdminController.php(126): db_upgrade_all(403, true)
121             $sDBVersion = getGlobalSetting('DBVersion');
122         }
123         if ((int) $sDBVersion < Yii::app()->getConfig('dbversionnumber') && $action != 'databaseupdate') {
124             // Try a silent update first
125             Yii::app()->loadHelper('update/updatedb');
126             if (!db_upgrade_all(intval($sDBVersion), true)) {
127                 $this->redirect(array('/admin/databaseupdate/sa/db'));
128             }
129         }
130 
131 
2019-01-01 16:10:57 nginx/1.14.1 Yii Framework/1.1.20