CDbException

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

/home/svetnew/web/odeon-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/odeon-svet.ru/public_html/protected/models/Tovars_text.php(7): CActiveRecord::model("Tovars_text")
02 
03 class Tovars_text extends CActiveRecord
04 {
05     public static function model($className=__CLASS__)
06     {
07         return parent::model($className);
08     }
09 
10     public function tableName()
11     {
12         return 'tovars_text';
#2
+
 /home/svetnew/web/odeon-svet.ru/public_html/protected/controllers/TovarsController.php(183): Tovars_text::model()
178                             $textallopts .= '<li><span>' . $kk . '</span><b>' . implode(", ", $n_mass) . '</b></li>'; //$vv
179                         }
180                     }
181                 }
182 
183                 $modeltext = Tovars_text::model()->findByAttributes(array('id_tovar' => $content->id));
184 
185                 if (!isset($modeltext->id)) {
186                     $newtext = "";
187                     $newtitle = "";
188                     $newdescription = "";
#17
+
 /home/svetnew/web/odeon-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 02:59:14 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.13