CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'selina123_dvigas.models' doesn't exist. The SQL statement executed was: SELECT `t`.`id` AS `t0_c0`, `t`.`marka_id` AS `t0_c1`, `t`.`name` AS `t0_c2`, `t`.`seo_name` AS `t0_c3`, `t`.`img` AS `t0_c4`, `t`.`code` AS `t0_c5`, `t`.`commerc` AS `t0_c6`, `t`.`trucks` AS `t0_c7`, `t`.`date_start` AS `t0_c8`, `t`.`date_end` AS `t0_c9`, `t`.`seo_url` AS `t0_c10`, `t`.`url` AS `t0_c11`, `t`.`seo_title` AS `t0_c12`, `t`.`seo_kw` AS `t0_c13`, `t`.`seo_description` AS `t0_c14`, `t`.`seo_h1` AS `t0_c15`, `t`.`seo_country` AS `t0_c16`, `t`.`seo_text` AS `t0_c17`, `t`.`seo_dvig_name` AS `t0_c18`, `komplekts`.`id` AS `t1_c0`, `komplekts`.`model_id` AS `t1_c1`, `komplekts`.`modifikatsiya` AS `t1_c2`, `komplekts`.`kod` AS `t1_c3`, `komplekts`.`tip_dvig` AS `t1_c4`, `komplekts`.`model_dvig` AS `t1_c5`, `komplekts`.`obyem_dvig_l` AS `t1_c6`, `komplekts`.`moschnost_l_s` AS `t1_c7`, `komplekts`.`tip_kuzova` AS `t1_c8`, `komplekts`.`privod` AS `t1_c9`, `komplekts`.`tip_kpp` AS `t1_c10`, `komplekts`.`kol_vo_dverey` AS `t1_c11`, `komplekts`.`tonnage` AS `t1_c12`, `komplekts`.`wheel_arrangement` AS `t1_c13`, `komplekts`.`datyi_vyipuska` AS `t1_c14`, `komplekts`.`date_start` AS `t1_c15`, `komplekts`.`date_end` AS `t1_c16`, `komplekts`.`seo_url` AS `t1_c17`, `komplekts`.`seo_title` AS `t1_c18`, `komplekts`.`seo_kw` AS `t1_c19`, `komplekts`.`seo_description` AS `t1_c20`, `komplekts`.`seo_h1` AS `t1_c21`, `komplekts`.`seo_country` AS `t1_c22`, `komplekts`.`seo_text` AS `t1_c23`, `komplekts`.`seo_dvig_name` AS `t1_c24` FROM `models` `t` LEFT OUTER JOIN `komplekts` `komplekts` ON (`komplekts`.`model_id`=`t`.`id`) WHERE (t.seo_url="mustang-kupe") AND (komplekts.model_id=t.id)

/home/s/selina123/dvigas.ru/public_html/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/s/selina123/dvigas.ru/public_html/protected/models/Models.php(53): CActiveRecord->find(CDbCriteria)
48             ),
49         );
50         
51         $criteria->condition = 't.seo_url="'.$seo_url.'"';
52         
53         $res['komplekts'] = $this->find($criteria);
54         
55         $res['marka'] = Marki::model()->find(array('condition'=>'seo_url="'.$marka_seo_url.'"'));
56         
57         $komplekt_ids = '';
58         
#7
+
 /home/s/selina123/dvigas.ru/public_html/protected/controllers/SiteController.php(121): Models->get_komplekts("mustang-kupe", "ford-usa")
116     
117     public function actionModel() {    
118     
119         $models = new Models();
120         
121         $result = $models->get_komplekts($_REQUEST['models'], $_REQUEST['marka']);
122         
123         $this->path_req = array(
124             'marka'    => $_REQUEST['marka'],
125             'model'    => $_REQUEST['models'],
126         );
#15
+
 /home/s/selina123/dvigas.ru/public_html/index.php(22): CApplication->run()
17 
18 // remove the following line when in production mode
19 defined('YII_DEBUG') or define('YII_DEBUG', true);
20 
21 require_once($yii);
22 Yii::createWebApplication($config)->run(); 
2024-03-29 14:43:33 Apache/2.4.55 (Unix) Yii Framework/1.1.14