CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'selina123_dvigas.komplekts' doesn't exist. The SQL statement executed was: SELECT k.*, c.name as `country`, mod.img as `mod_img`, mod.name as `mod_name`, mod.seo_name as `seo_mod_name`, mod.code as `mod_code`, mod.seo_url as `mod_url`, mar.seo_url as `mar_url`, mar.name as `mar_name`, mar.seo_name as `seo_mar_name`
FROM komplekts as k LEFT JOIN models as `mod` ON (mod.id = k.model_id) LEFT JOIN country as c ON (c.id = k.seo_country)
LEFT JOIN marki as `mar` ON (mar.id = mod.marka_id) WHERE k.seo_url = "3-3-4wd-vg33e-170"

/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

#1
+
 /home/s/selina123/dvigas.ru/public_html/protected/models/Komplekts.php(34): CDbCommand->queryRow()
29         
30         $sql = 'SELECT k.*, c.name as `country`, mod.img as `mod_img`, mod.name as `mod_name`, mod.seo_name as `seo_mod_name`, mod.code as `mod_code`, mod.seo_url as `mod_url`, mar.seo_url as `mar_url`, mar.name as `mar_name`, mar.seo_name as `seo_mar_name`  
31                     FROM komplekts as k LEFT JOIN models as `mod` ON (mod.id = k.model_id) LEFT JOIN country as c ON (c.id = k.seo_country)
32                     LEFT JOIN marki as `mar` ON (mar.id = mod.marka_id) WHERE k.seo_url = "'.$seo_url.'"';
33         
34         $res['komplekt'] = $kompl = Yii::app()->db->createCommand($sql)->queryRow();
35         
36         if(empty($res['komplekt'])) return null;
37         
38         $res['komplekt']['params'] = array(
39             'modifikatsiya' => $kompl['modifikatsiya'], 'kod' => $kompl['kod'],
#2
+
 /home/s/selina123/dvigas.ru/public_html/protected/controllers/SiteController.php(173): Komplekts->get_dvigs("3-3-4wd-vg33e-170")
168     
169     public function actionKomplekt() {    
170     
171         $komplekts = new Komplekts();
172         
173         $dvigs = $komplekts->get_dvigs($_REQUEST['komplekts']);
174         
175         $this->path_req = array(
176             'marka'    => $_REQUEST['marka'],
177             'model'    => $_REQUEST['models'],
178             'komplekt' => $_REQUEST['komplekts'],
#10
+
 /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:49:09 Apache/2.4.55 (Unix) Yii Framework/1.1.14