CDbException

CDbCommand nie zdołał wykonać polecenia SQL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'kontakt' in 'where clause'. The SQL statement executed was: SELECT COUNT(*) FROM `news` `t` WHERE id=kontakt

/home/tomaszswiont/ftp/framework/db/CDbCommand.php(516)

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

Stack Trace

#4
+
 /home/tomaszswiont/ftp/protected/components/MultilingualActiveRecord.php(199): CDataProvider->getTotalItemCount(true)
194     protected function fetchData()
195     {
196         $criteria=clone $this->getCriteria();
197         if(($pagination=$this->getPagination())!==false)
198         {
199             $pagination->setItemCount($this->getTotalItemCount(true));
200             $pagination->applyLimit($criteria);
201         }
202         if(($sort=$this->getSort())!==false)
203             $sort->applyOrder($criteria);
204 
#6
+
 /home/tomaszswiont/ftp/themes/marpol/views/news/news.php(2): CDataProvider->getData()
1 <?php
2     $dataTmp = $dataProvider->getData();
3     $data = $dataTmp[0];
4 ?>
5 <p class="head">
6         <?php
7             if(Yii::app()->language == 'pl'){
#11
+
 /home/tomaszswiont/ftp/protected/controllers/NewsController.php(215): CController->render("news", array("dataProvider" => MultilingualActiveDataProvider))
210                             'criteria' => array(
211                                 'condition' => 'id='.$id)
212                 ));
213         $this->render('news', array(
214             'dataProvider' => $dataProvider,
215         ));
216     }
217     
218     public function actionLoad(){
219         if(isset($_POST['page']) ){
220             $limit = 3 + ($_POST['page']-1)*5;
2024-03-28 11:07:07 Apache/2 Yii Framework/1.1.8