CDbException CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'US_States' in 'field list'. The SQL statement executed was: insert INTO labelsets (label_name,languages) VALUES (US_States,en) /home/content/FooFoo/html/limesurvey2/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 #0 – /home/content/FooFoo/html/limesurvey2/framework/db/CDbCommand.php(372): CDbCommand->queryInternal("", 0, array()) 367 * @return CDbDataReader the reader object for fetching the query result 368 * @throws CException execution failed 369 */ 370 public function query($params=array()) 371 { 372 return $this->queryInternal('',0,$params); 373 } 374 375 /** 376 * Executes the SQL statement and returns all rows. 377 * @param boolean $fetchAssociative whether each row should be returned as an associated array with #1 – /home/content/FooFoo/html/limesurvey2/application/helpers/admin/import_helper.php(2031): CDbCommand->query() 2026 2027 $newvalues=array_values($labelsetrowdata); 2028 if ($xssfilter) 2029 XSSFilterArray($newvalues); 2030 $lsainsert = "insert INTO {{labelsets}} (".implode(',',array_keys($labelsetrowdata)).") VALUES (".implode(',',$newvalues).")"; //handle db prefix 2031 $lsiresult= Yii::app()->db->createCommand($lsainsert)->query(); 2032 $results['labelsets']++; 2033 2034 // Get the new insert id for the labels inside this labelset 2035 $newlid=Yii::app()->db->getLastInsertID(); 2036 #2 – /home/content/FooFoo/html/limesurvey2/application/controllers/admin/labels.php(143): CSVImportLabelset("/home/content/FooFoo/html/limesurvey2/tmp/US_States_Limes...", array("checkforduplicates" => "on")) 138 $options['checkforduplicates'] = 'off'; 139 if (isset($_POST['checkforduplicates'])) 140 $options['checkforduplicates'] = $_POST['checkforduplicates']; 141 142 if (strtolower($sExtension) == 'csv') 143 $aImportResults = CSVImportLabelset($sFullFilepath, $options); 144 elseif (strtolower($sExtension) == 'lsl') 145 $aImportResults = XMLImportLabelsets($sFullFilepath, $options); 146 else 147 $this->getController()->error($clang->gT("Uploaded label set file needs to have an .lsl extension.")); 148 #3 unknown(0): labels->import() #4 – /home/content/FooFoo/html/limesurvey2/framework/web/actions/CAction.php(107): ReflectionMethod->invokeArgs(labels, array()) 102 else if($param->isDefaultValueAvailable()) 103 $ps[]=$param->getDefaultValue(); 104 else 105 return false; 106 } 107 $method->invokeArgs($object,$ps); 108 return true; 109 } 110 } #5 – /home/content/FooFoo/html/limesurvey2/application/core/Survey_Common_Action.php(82): CAction->runWithParamsInternal(labels, ReflectionMethod, array("sa" => "import")) 77 $oMethod = new ReflectionMethod($this, $sDefault); 78 } 79 80 // We're all good to go, let's execute it 81 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params 82 return parent::runWithParamsInternal($this, $oMethod, $params); 83 } 84 85 /** 86 * Some functions have different parameters, which are just an alias of the 87 * usual parameters we're getting in the url. This function just populates #6 + /home/content/FooFoo/html/limesurvey2/framework/web/CController.php(309): Survey_Common_Action->runWithParams(array("sa" => "import")) #7 + /home/content/FooFoo/html/limesurvey2/framework/web/CController.php(287): CController->runAction(labels) #8 + /home/content/FooFoo/html/limesurvey2/framework/web/CController.php(266): CController->runActionWithFilters(labels, array()) #9 + /home/content/FooFoo/html/limesurvey2/application/controllers/AdminController.php(158): CController->run("labels") #10 + /home/content/FooFoo/html/limesurvey2/framework/web/CWebApplication.php(276): AdminController->run("labels") #11 + /home/content/FooFoo/html/limesurvey2/framework/web/CWebApplication.php(135): CWebApplication->runController("admin/labels/sa/import") #12 + /home/content/FooFoo/html/limesurvey2/framework/base/CApplication.php(162): CWebApplication->processRequest() #13 + /home/content/FooFoo/html/limesurvey2/index.php(171): CApplication->run() 2012-07-25 07:19:12 Apache Yii Framework/1.1.10