CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sub_region_id' in 'where clause'. The SQL statement executed was: SELECT COUNT(*) FROM `advertSale` `t` WHERE ((((object_id=:ycp0) AND (sub_region_id=:ycp1)) AND (mainOption = 0)) AND (status_id = 5)) AND (date_update < 1711644755)

/home/h99100/public_html/framework/db/CDbCommand.php(543)

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

Stack Trace

#10
+
 /home/h99100/public_html/protected/views/site/listSale.php(138): CBaseController->widget("zii.widgets.CListView", array("pager" => array("header" => false, "previousPageCssClass" => "pagenav", "nextPageCssClass" => "pagenav", "htmlOptions" => array("class" => "pagination pagination-centered"), ...), "dataProvider" => CActiveDataProvider, "itemView" => "_viewSale", "summaryText" => "", ...))
133         'ajaxUpdate'=>false,
134         'sortableAttributes'=>array(
135             'cost' => 'По цене',
136             'date_create' => 'По дате',
137         ),
138     ));
139     ?>
140 <script>
141     $(function(){
142      $('.text').truncatable({    limit: 130, more: ' Читать далее ', less: true, hideText: '[скрыть]' }); 
143     });
#15
+
 /home/h99100/public_html/protected/controllers/SiteController.php(3874): CController->render("listSale", array("dataProvider" => CActiveDataProvider, "showRegion" => true, "seoFile" => false, "pagination" => array("pageSize" => 5)))
3869                         'showRegion' => $showRegion,
3870                         'seoFile' => $seoFile,
3871                         'pagination' => array(
3872                             'pageSize' => 5,
3873                         )
3874                     ));
3875         }
3876 
3877 
3878 
3879     }
#28
+
 /home/h99100/public_html/index.php(18): CApplication->run()
13 //defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
14 ini_set('display_errors',true);
15 error_reporting(0);
16 error_reporting(E_ALL & ~E_NOTICE);
17 require_once($yii);
18 Yii::createWebApplication($config)->run();
19 
20 
2024-03-29 00:02:35 Apache Yii Framework/1.1.14