CDbException

Таблица "ankor", упомянутая в записи active record класса "Ankor", не найдена в базе данных.

/var/www/lynix/data/www/lynix.ru/framework/db/ar/CActiveRecord.php(2362)

2350 
2351     /**
2352      * Constructor.
2353      * @param CActiveRecord $model the model instance
2354      * @throws CDbException if specified table for active record class cannot be found in the database
2355      */
2356     public function __construct($model)
2357     {
2358         $this->_modelClassName=get_class($model);
2359 
2360         $tableName=$model->tableName();
2361         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2362             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2363                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2364         if($table->primaryKey===null)
2365         {
2366             $table->primaryKey=$model->primaryKey();
2367             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2368                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2369             elseif(is_array($table->primaryKey))
2370             {
2371                 foreach($table->primaryKey as $name)
2372                 {
2373                     if(isset($table->columns[$name]))
2374                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#3
+
 /var/www/lynix/data/www/lynix.ru/protected/models/Megaindex.php(87): CActiveRecord->findByPk("1160")
82 
83 
84     public function search($id = 0) {
85         $exclude = array();
86         if($id > 0) {
87             $ankor = Ankor::model()->findByPk($id);
88             if($ankor instanceof Ankor) {
89                 $aT = $ankor->ankorTexts;
90                 foreach($aT as $t) {
91                     $exclude[] = $t->text;
92                 }
#4
+
 /var/www/lynix/data/www/lynix.ru/themes/blue-gray/views/ankor/_megaindextable.php(7): Megaindex->search("1160")
02     <div class="styleTable">
03 <?php
04 $tblId = 'megaindex-data-grid';
05 $dropdown = (defined("MAINPAGE_MEGAINDEX")) ? "" : $m->getTableDropDown();
06 $checkbox = (defined("MAINPAGE_MEGAINDEX")) ? array() : $m->getTableCheckbox(2);
07 $dataProvider = $m->search(isset($_GET['id']) ? $_GET['id'] : 0);
08 
09 $pageCookie = 'pageSizeAnkorTMega';
10 $dataProvider->pagination->pageSize = 14;
11 
12 $this->widget('zii.widgets.grid.CGridView', array(
#5
+
 /var/www/lynix/data/www/lynix.ru/themes/blue-gray/views/ankor/_megaindexdialog.php(15): include_once("/var/www/lynix/data/www/lynix.ru/themes/blue-gray/views/ankor/_m...")
10             'buttons'     => array(
11                 array('text'     => 'Закрыть', 'click'     => 'js:function(){$(this).dialog("close");}'),
12             ),
13         ),
14 ));
15 include_once(Yii::getPathOfAlias('webroot')."/themes/".Yii::app()->theme->getName()."/views/ankor/_megaindextable.php");
16 
17 $this->endWidget('zii.widgets.jui.CJuiDialog'); 
18 if(!defined("MAINPAGE_MEGAINDEX")) {
19     Yii::app()->clientScript->registerScript(
20             __FILE__.__LINE__,
2024-03-28 12:49:08 Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips Yii Framework/1.1.14