CDbException

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

/home/svetnew/web/odeon-svet.ru/public_html/protected/controllers/TovarsController.php(391)

379                         $content->update();
380                         if (is_dir('images/tovars/' . $content->id)) $this->rrmdir('images/tovars/' . $content->id);
381                     }
382                 }
383 
384                 $another = Tovars::model()->findAll(array('select' => '`id`,`name`,`url`,`price`,`old_price`,`amount`,`images`', 'condition' => '`category`=' . $content->category . ' && `id` > ' . $content->id, 'order' => '`id` ASC', 'limit' => 10));
385                 $anotherdop = "";
386                 if (count($another) < 10) {
387                     $anotherdop = Tovars::model()->findAll(array('select' => '`id`,`name`,`url`,`price`,`old_price`,`amount`,`images`', 'condition' => '`category`=' . $content->category . ' && `id` != ' . $content->id, 'order' => '`id` ASC', 'limit' => 10 - count($another)));
388                 }
389 
390                 if ($content->category != 0) {
391                     if ($content->cat->id_parent != 0) {
392                         $par_arr = $this->findparents($content->cat->id_parent, array($content->name, $content->cat->name => "/katalog/" . $content->cat->url));
393                         $par_arr["Каталог"] = "/katalog";
394                         $this->breadcrumbs = array_reverse($par_arr);
395                     } else {
396                         $this->breadcrumbs = array("Каталог" => "/katalog", $content->cat->name => "/katalog/" . $content->cat->url, $content->name);
397                     }
398                 } else {
399                     $this->breadcrumbs = array("Каталог" => "/katalog", $content->name);
400                 }
401 
402                 $this->render('tovar', array('content' => $content, 'text' => $text, 'textimages' => $textimages, 'textmainopts' => $textmainopts, 'textallopts' => $textallopts, 'another' => $another, 'anotherdop' => $anotherdop));
403             } else {

Stack Trace

#5
+
 /home/svetnew/web/odeon-svet.ru/public_html/protected/controllers/TovarsController.php(391): CActiveRecord->__get("cat")
386                 if (count($another) < 10) {
387                     $anotherdop = Tovars::model()->findAll(array('select' => '`id`,`name`,`url`,`price`,`old_price`,`amount`,`images`', 'condition' => '`category`=' . $content->category . ' && `id` != ' . $content->id, 'order' => '`id` ASC', 'limit' => 10 - count($another)));
388                 }
389 
390                 if ($content->category != 0) {
391                     if ($content->cat->id_parent != 0) {
392                         $par_arr = $this->findparents($content->cat->id_parent, array($content->name, $content->cat->name => "/katalog/" . $content->cat->url));
393                         $par_arr["Каталог"] = "/katalog";
394                         $this->breadcrumbs = array_reverse($par_arr);
395                     } else {
396                         $this->breadcrumbs = array("Каталог" => "/katalog", $content->cat->name => "/katalog/" . $content->cat->url, $content->name);
#20
+
 /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:51 Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g Yii Framework/1.1.13