CDbException

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

/home/svetnew/web/svet-lussole.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/svet-lussole.ru/public_html/protected/models/Tovars.php(7): CActiveRecord::model("Tovars")
02 
03 class Tovars 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';
#2
+
 /home/svetnew/web/svet-lussole.ru/public_html/protected/controllers/TovarsController.php(59): Tovars::model()
54             $this->layout = "main";
55 
56             $info = Info::model()->findByAttributes(array("id" => "1"));
57             $this->info = $info;
58 
59             $content = Tovars::model()->findByAttributes(array('url' => $this->nosqlinj($url)));
60 
61             if (isset($content->id) && $content->disp == 1) {
62                 $massmain = array();
63                 $massall = array();
64                 $masscheck = array();
#17
+
 /home/svetnew/web/svet-lussole.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:00:55 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.13