CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'selina123_dvigas.marki' doesn't exist. The SQL statement executed was: SELECT * FROM `marki` `t` WHERE active = 1

/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

#3
+
 /home/s/selina123/dvigas.ru/public_html/protected/models/Marki.php(48): CActiveRecord->findAll(CDbCriteria)
43         
44         $criteria=new CDbCriteria;
45         
46         $criteria->condition = 'active = 1';
47         
48         $marki = $this->findAll($criteria);
49         
50         return $marki;
51     }
52     
53     public function get_models($seo_url, $commerc) {    
#4
+
 /home/s/selina123/dvigas.ru/public_html/protected/components/Controller.php(38): Marki->get_all()
33         Yii::app()->og->title = 'Контрактные двигатели - Dvigas.ru';
34         Yii::app()->og->description = 'Контрактные двигатели - Dvigas.ru';
35         Yii::app()->og->setImage('https://dvigas.ru/image/logo.png');
36 
37         $marki = new Marki();
38         $this->marki = $marki->get_all();
39 
40         $this->callbackForm = new CallbackForm();
41 
42         return true;
43     }
#11
+
 /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:46:44 Apache/2.4.55 (Unix) Yii Framework/1.1.14