CDbException

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

/home/svetnew/web/reccagniangelo-svet.ru/public_html/framework/db/ar/CActiveRecord.php(2310)

2298     private $_model;
2299 
2300     /**
2301      * Constructor.
2302      * @param CActiveRecord $model the model instance
2303      */
2304     public function __construct($model)
2305     {
2306         $this->_model=$model;
2307 
2308         $tableName=$model->tableName();
2309         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2310             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2311                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2312         if($table->primaryKey===null)
2313         {
2314             $table->primaryKey=$model->primaryKey();
2315             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2316                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2317             elseif(is_array($table->primaryKey))
2318             {
2319                 foreach($table->primaryKey as $name)
2320                 {
2321                     if(isset($table->columns[$name]))
2322                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#1
+
 /home/svetnew/web/reccagniangelo-svet.ru/public_html/protected/models/Options_cache.php(5): CActiveRecord::model("Options_cache")
01 <?php
02 class Options_cache extends CActiveRecord
03 {
04     public static function model($className = __CLASS__) {
05         return parent::model($className);
06     }
07     public function tableName() {
08         return 'options_cache';
09     }
10     public function rules() {
#2
+
 /home/svetnew/web/reccagniangelo-svet.ru/public_html/protected/controllers/OptionsController.php(211): Options_cache::model()
206                 }
207 
208                 if (!empty($cond)) {
209                     $idtovs = array();
210                     $sendtovars = array();
211                     $check_cache = Options_cache::model()->findByAttributes(array('id_opts' => $namefile));
212                     if (isset($check_cache->id)) {
213                         $idtovs = json_decode($check_cache->id_t);
214                     } else {
215                         $file1 = file_get_contents("images/menu/ch_opts_tvr.txt");
216                         $gsm = json_decode($file1, true);
#17
+
 /home/svetnew/web/reccagniangelo-svet.ru/public_html/index.php(9): CApplication->run()
4 $config=dirname(__FILE__).'/protected/config/main.php';
5 
6 defined('YII_DEBUG') or define('YII_DEBUG',true);
7 
8 require_once($yii);
9 Yii::createWebApplication($config)->run();
2024-03-19 05:06:55 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.13