CDbException

The table "allNews" for active record class "AllNews" cannot be found in the database.

/usr/share/php/framework/db/ar/CActiveRecord.php(2391)

2379 
2380     /**
2381      * Constructor.
2382      * @param CActiveRecord $model the model instance
2383      * @throws CDbException if specified table for active record class cannot be found in the database
2384      */
2385     public function __construct($model)
2386     {
2387         $this->_modelClassName=get_class($model);
2388 
2389         $tableName=$model->tableName();
2390         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2391             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2392                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2393                 
2394         if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null)
2395         {
2396             $table->primaryKey=$modelPk;
2397             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2398                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2399             elseif(is_array($table->primaryKey))
2400             {
2401                 foreach($table->primaryKey as $name)
2402                 {
2403                     if(isset($table->columns[$name]))

Stack Trace

#4
+
 /home/atv/atvgroup.ru/protected/controllers/SiteController.php(123): CActiveRecord->find()
118         $this->layout = 'clear';
119 
120 
121 
122 
123         $article = AllNews::model()->find("`id`=$id and `code`='pelec' ");
124 
125         //$article = array_shift($articles);
126         //print_r($article);
127         //die();
128         $string = $article->text;
#14
+
 /home/atv/atvgroup.ru/index.php(19): CApplication->run()
14 // specify how many levels of call stack should be shown in each log message
15 //defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
16 
17 require_once($yii);
18 
19 Yii::createWebApplication($config)->run();
20 
21 
2024-03-28 17:24:46 nginx/1.24.0 Yii Framework/1.1.30-dev