CDbException

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

/home/admin/web/default.domain/public_html/framework/db/ar/CActiveRecord.php(2310)

2298     private $_model;
2299 
2300     /**
2301      * Constructor.
2302      * @param CActiveRecord $model the model instance
2303      */
2304     public function __construct($model)
2305     {
2306         $this->_model=$model;
2307 
2308         $tableName=$model->tableName();
2309         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2310             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2311                 array('{class}'=>get_class($model),'{table}'=>$tableName)));
2312         if($table->primaryKey===null)
2313         {
2314             $table->primaryKey=$model->primaryKey();
2315             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2316                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2317             elseif(is_array($table->primaryKey))
2318             {
2319                 foreach($table->primaryKey as $name)
2320                 {
2321                     if(isset($table->columns[$name]))
2322                         $table->columns[$name]->isPrimaryKey=true;

Stack Trace

#3
+
 /home/admin/web/default.domain/public_html/protected/controllers/LoginController.php(21): CActiveRecord->__construct()
16         public function actionIndex()
17     {
18             Yii::app()->session;
19             $this->layout = 'login';
20             $result = array();
21             $model = new Login;
22             $error = '';
23             if (!empty($_POST['email']) && !empty($_POST['pass'])){
24                 $result = $model->logined($_POST);
25                 if (!empty($result)){
26                     unset($result['pass']);
#11
+
 /home/admin/web/default.domain/public_html/index.php(22): CApplication->run()
17 if(!empty($_SESSION['user']['id']))Yii::app()->db->createCommand('UPDATE `users` SET `online`='.time().' WHERE `id`='.$_SESSION['user']['id'])->execute();
18  
19 if (!isset($_COOKIE['usrkey'])){setcookie("usrkey",  uniqid().uniqid().time(),time()+3600*24*365);}
20 
21 
22 Yii::createWebApplication($config)->run();
2024-03-29 10:07:34 Apache/2.2.15 (CentOS) Yii Framework/1.1.13