CDbException

CDbCommand SQL-sorğusunu yerinə yetirməyə müvəffəq olmadı: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'hide_self' in 'where clause'. The SQL statement executed was: SELECT `projects`.`id` AS `t1_c0`, `projects`.`title_az` AS `t1_c1`, `projects`.`title_ru` AS `t1_c2`, `projects`.`title_en` AS `t1_c3`, `projects`.`subtitle_az` AS `t1_c4`, `projects`.`subtitle_en` AS `t1_c5`, `projects`.`subtitle_ru` AS `t1_c6`, `projects`.`desc_az` AS `t1_c7`, `projects`.`desc_ru` AS `t1_c8`, `projects`.`desc_en` AS `t1_c9`, `projects`.`type` AS `t1_c10`, `projects`.`ltype` AS `t1_c11`, `projects`.`img` AS `t1_c12`, `projects`.`file` AS `t1_c13`, `projects`.`video` AS `t1_c14`, `projects`.`active` AS `t1_c15`, `projects`.`modify_time` AS `t1_c16`, `projects`.`create_time` AS `t1_c17` FROM `bbtm_new_projects` `projects` WHERE (active = 1 and hide_self = 0) AND (title_az != "" AND desc_az != "") AND (`projects`.`cid`=:ypl0) ORDER BY unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' )) DESC

/wwwroot/public_html/newultra/ultra/framework/db/CDbCommand.php(541)

529         {
530             if($this->_connection->enableProfiling)
531                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
532 
533             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
534             $message=$e->getMessage();
535             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
536                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
537 
538             if(YII_DEBUG)
539                 $message.='. The SQL statement executed was: '.$this->getText().$par;
540 
541             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
542                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
543         }
544     }
545 
546     /**
547      * Builds a SQL SELECT statement from the given query specification.
548      * @param array $query the query specification in name-value pairs. The following
549      * query options are supported: {@link select}, {@link distinct}, {@link from},
550      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
551      * {@link limit}, {@link offset} and {@link union}.
552      * @return string the SQL statement
553      * @since 1.1.6

Stack Trace

#6
+
 /wwwroot/public_html/newultra/ultra/frontend/protected/views/site/categorymore.php(21): CActiveRecord->__call("projects", array(array("condition" => "active = 1 and hide_self = 0", "scopes" => array("lang"), "order" => "unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' )) DESC ")))
16 
17 <p></p>
18     <ul class="timeline2 clearfix">
19         <?php 
20         if( count( $model ) > 0 ):
21             $cmodel = $model->projects(array('condition'=>'active = 1 and hide_self = 0', 'scopes' => array('lang'),'order'=>"unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' ))  DESC " ));        
22             foreach( $cmodel as $c ): 
23         ?>
24                 <li class="item item-left ">
25                 <?php if(empty($c->url)){?>
26                      <a href="<?=$this->createUrl($type.'/'.$c->id)?>"><?=$c->{'title_'.Yii::app()->language}?></a>
#7
+
 /wwwroot/public_html/newultra/ultra/frontend/protected/views/site/categorymore.php(21): Category->projects(array("condition" => "active = 1 and hide_self = 0", "scopes" => array("lang"), "order" => "unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' )) DESC "))
16 
17 <p></p>
18     <ul class="timeline2 clearfix">
19         <?php 
20         if( count( $model ) > 0 ):
21             $cmodel = $model->projects(array('condition'=>'active = 1 and hide_self = 0', 'scopes' => array('lang'),'order'=>"unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' ))  DESC " ));        
22             foreach( $cmodel as $c ): 
23         ?>
24                 <li class="item item-left ">
25                 <?php if(empty($c->url)){?>
26                      <a href="<?=$this->createUrl($type.'/'.$c->id)?>"><?=$c->{'title_'.Yii::app()->language}?></a>
#12
+
 /wwwroot/public_html/newultra/ultra/frontend/protected/controllers/SiteController.php(383): CController->render("categorymore", array("model" => Category, "type" => "solserv"))
378         $model = Category::model()->lang('name')->findByPk((int)$id, array('condition'=>'type = '.$tid));
379         
380         if( count($model) <= 0 )
381             throw new CHttpException(404,'The requested page does not exist.');
382             
383         $this->render('categorymore', array('model'=>$model, 'type'=>$type));
384     }
385     
386     public function actionMprojects($id)
387     {
388         $model = Projects::model()->findByPk((int)$id, array('condition'=>'active = 1  and type = 0'));
2024-03-19 14:02:41 Apache/2.2.15 (CentOS) Yii Framework/1.1.13