CDbException

CDbCommand SQL-sorğusunu yerinə yetirməyə müvəffəq olmadı: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sdate' in 'order clause'. The SQL statement executed was: SELECT * FROM `bbtm_new_projects` `t` WHERE (title_az != "" AND desc_az != "") AND (active = 1 and type = 2) ORDER BY unix_timestamp( str_to_date( sdate, '%d-%m-%Y %H:%i' )) DESC LIMIT 4

/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

#9
+
 /wwwroot/public_html/newultra/ultra/frontend/protected/views/site/news.php(27): CBaseController->widget("zii.widgets.CListView", array("ajaxUpdate" => true, "dataProvider" => CActiveDataProvider, "itemView" => "_news", "summaryText" => false, ...))
22             'pager' => array(
23                    'header'=>'',
24                    'cssFile'=>Yii::app()->getBaseUrl(true).'/css/pager.css',
25                    'maxButtonCount'=>'7',
26                ), 
27             ));
28     ?>
29         
30 </main>
#14
+
 /wwwroot/public_html/newultra/ultra/frontend/protected/controllers/SiteController.php(280): CController->render("news", array("model" => CActiveDataProvider))
275                 'params' => array(),
276                 'pageVar'=>'page'
277             ),
278         ));
279         
280         $this->render('news', array('model'=>$model));
281     }
282     
283     
284    
285     
#22
+
 /wwwroot/public_html/newultra/www/front/index.php(35): CApplication->run()
30 /** url defines */
31 
32 define('DEFAULTURL', '/menus/index', true);
33 
34 require_once($yii);
35 Yii::createWebApplication($config)->run();
2024-03-19 12:35:56 Apache/2.2.15 (CentOS) Yii Framework/1.1.13