CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'artstl.tbl_db_canonical' doesn't exist. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`tbl_db_album_id` AS `t0_c1`, `t`.`name` AS `t0_c2`, `t`.`number` AS `t0_c3`, `t`.`text` AS `t0_c4`, `t`.`status` AS `t0_c5`, `t`.`create_at` AS `t0_c6`, `t`.`update_at` AS `t0_c7`, `t`.`canon_link` AS `t0_c8`, `t`.`link` AS `t0_c9`, `t`.`tbl_db_artist_id` AS `t0_c10`, `t`.`lock_version` AS `t0_c11`, `t`.`follow_links` AS `t0_c12`, `artist`.`id` AS `t1_c0`, `artist`.`name` AS `t1_c1`, `artist`.`tbl_db_sym_id` AS `t1_c2`, `artist`.`status` AS `t1_c3`, `artist`.`create_at` AS `t1_c4`, `artist`.`update_at` AS `t1_c5`, `artist`.`link` AS `t1_c6`, `artist`.`lock_version` AS `t1_c7`, `artist`.`follow_links` AS `t1_c8`, `album`.`id` AS `t2_c0`, `album`.`tbl_db_artist_id` AS `t2_c1`, `album`.`name` AS `t2_c2`, `album`.`year` AS `t2_c3`, `album`.`status` AS `t2_c4`, `album`.`create_at` AS `t2_c5`, `album`.`update_at` AS `t2_c6`, `album`.`lock_version` AS `t2_c7`, `video`.`id` AS `t3_c0`, `video`.`ytb_code` AS `t3_c1`, `video`.`tbl_db_artist_id` AS `t3_c2`, `video`.`ytb_ex` AS `t3_c3`, `video`.`tbl_db_text_id` AS `t3_c4`, `video`.`create_at` AS `t3_c5`, `video`.`update_at` AS `t3_c6`, `canonical`.`id` AS `t4_c0`, `canonical`.`tbl_db_album_id` AS `t4_c1`, `canonical`.`name` AS `t4_c2`, `canonical`.`number` AS `t4_c3`, `canonical`.`text` AS `t4_c4`, `canonical`.`status` AS `t4_c5`, `canonical`.`create_at` AS `t4_c6`, `canonical`.`update_at` AS `t4_c7`, `canonical`.`canon_link` AS `t4_c8`, `canonical`.`link` AS `t4_c9`, `canonical`.`tbl_db_artist_id` AS `t4_c10`, `canonical`.`lock_version` AS `t4_c11`, `canonical`.`follow_links` AS `t4_c12` FROM `tbl_db_text` `t` LEFT OUTER JOIN `tbl_db_artist` `artist` ON (`t`.`tbl_db_artist_id`=`artist`.`id`) LEFT OUTER JOIN `tbl_db_album` `album` ON (`t`.`tbl_db_album_id`=`album`.`id`) LEFT OUTER JOIN `tbl_db_video` `video` ON (`video`.`tbl_db_text_id`=`t`.`id`) AND (video.ytb_ex=200) LEFT OUTER JOIN `tbl_db_canonical` `text_canon` ON (`text_canon`.`tbl_db_text_id`=`t`.`id`) LEFT OUTER JOIN `tbl_db_text` `canonical` ON (`text_canon`.`tbl_db_canonical_id`=`canonical`.`id`) WHERE (`t`.`id`=2423356) ORDER BY t.name ASC, artist.name ASC, album.year DESC, album.name ASC, canonical.name ASC

/home/www/new.stlyrics.com/html/yii/framework/db/CDbCommand.php(543)

531         {
532             if($this->_connection->enableProfiling)
533                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
534 
535             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
536             $message=$e->getMessage();
537             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
538                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
539 
540             if(YII_DEBUG)
541                 $message.='. The SQL statement executed was: '.$this->getText().$par;
542 
543             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
544                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
545         }
546     }
547 
548     /**
549      * Builds a SQL SELECT statement from the given query specification.
550      * @param array $query the query specification in name-value pairs. The following
551      * query options are supported: {@link select}, {@link distinct}, {@link from},
552      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
553      * {@link limit}, {@link offset} and {@link union}.
554      * @throws CDbException if "from" key is not present in given query parameter
555      * @return string the SQL statement

Stack Trace

#6
+
 /home/www/new.stlyrics.com/html/protected/controllers/songs/songs/TextController.php(11): CActiveRecord->findByPk("2423356")
06 
07     public function actionIndex($text)
08     {
09         $id = DbTxtInd::model()->bylink($text)->find()->id;
10         
11         $model = DbText::model()->with('artist', 'album', 'video', 'canonical')->findByPk($id);
12         
13 //        Идет запрос в таблицу канониклов, если есть песня с таким же текстом у этого артиста - возвращаем её урл и делаем 301
14         if (($c = $model->canonical->fronturi) !== null ) $this->redirect($c, true, 301);
15         
16         if ($model===null  || $model->artist->link != $_GET['artist'] || $model->artist -> sym -> link != $_GET['sym'] || $model -> isnoindex) {
#16
+
 /home/www/new.stlyrics.com/html/protected/components/WebApplicationEndBehavior.php(25): CApplication->run()
20         // Attach the changeModulePaths event handler
21         // and raise it.
22         $this->onModuleCreate = array($this, 'changeModulePaths');
23         $this->onModuleCreate(new CEvent($this->owner));
24  
25         $this->owner->run(); // Run application.
26     }
27  
28     // This event should be raised when CWebApplication
29     // or CWebModule instances are being initialized.
30     public function onModuleCreate($event)
#19
+
 /home/www/new.stlyrics.com/html/index.php(117): CComponent->__call("runEnd", array("songs"))
112 date_default_timezone_set($timezone);
113 
114 $global = dirname(__FILE__).'/yii/global.php';
115 require_once($global);
116 require_once(dirname(__FILE__).'/yii/framework/'.$yii);
117 Yii::createWebApplication(dirname(__FILE__).'/protected/config/'.$config)->runEnd($end);
2024-03-18 23:50:01 Apache/2.2.15 Yii Framework/1.1.14