CDbException

CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'am-pentatonic-scale-6285' for key 'aliasUniqueIndex'. The SQL statement executed was: UPDATE `Tab` SET `tabId`=:yp0, `userId`=:yp1, `artistId`=:yp2, `categoryId`=:yp3, `name`=:yp4, `alias`=:yp5, `title`=:yp6, `keywords`=:yp7, `description`=:yp8, `fileExtension`=:yp9, `fileSize`=:yp10, `fileHash`=:yp11, `timeCreated`=:yp12, `downloadCount`=:yp13, `voteCount`=:yp14, `voteSum`=:yp15, `instruments`=:yp16, `shortContent`=:yp17, `fullContent`=:yp18, `allowRating`=:yp19, `allowComments`=:yp20, `official`=:yp21, `timeUpdated`=:yp22, `published`=:yp23, `removed`=:yp24 WHERE `Tab`.`tabId`=41305

/var/www/tvampire2/data/frameworks/yii-1.1.13.e9e4a0/framework/yiilite.php(8893)

8881             return $n;
8882         }
8883         catch(Exception $e)
8884         {
8885             if($this->_connection->enableProfiling)
8886                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
8887             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
8888             $message=$e->getMessage();
8889             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
8890                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
8891             if(YII_DEBUG)
8892                 $message.='. The SQL statement executed was: '.$this->getText().$par;
8893             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
8894                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
8895         }
8896     }
8897     public function query($params=array())
8898     {
8899         return $this->queryInternal('',0,$params);
8900     }
8901     public function queryAll($fetchAssociative=true,$params=array())
8902     {
8903         return $this->queryInternal('fetchAll',$fetchAssociative ? $this->_fetchMode : PDO::FETCH_NUM, $params);
8904     }
8905     public function queryRow($fetchAssociative=true,$params=array())

Stack Trace

#3
+
 /var/www/tvampire2/data/www/gtptabs.com/protected/modules/tab/controllers/frontend/tab/DownloadAction.php(68): CActiveRecord->save()
63                     // Если не было куки с языком, значит это бот
64                     elseif(!empty(Yii::app()->request->cookies['language']->value))
65                     {
66                         $downloadedTabsArray[] = $tab->tabId;
67                         Yii::app()->request->cookies['downloadedTabs'] = new CHttpCookie('downloadedTabs', GiJSON::encode($downloadedTabsArray), array('expire' => time()+60*60*24*365));
68                         $tab->save();
69                     }
70                 }
71                 if($type == 'free')
72                 {
73                     FileFunctions::fileForceDownload(
#11
+
 /var/www/tvampire2/data/www/gtptabs.com/protected/extends/GiController.php(132): CFilterChain->run()
127             elseif (!empty(Yii::app()->request->cookies['language']->value) && Yii::app()->language != Yii::app()->request->cookies['language']->value)
128             {
129                 Yii::app()->language = Yii::app()->request->cookies['language']->value;
130             }
131             
132             $filterChain->run();
133         }
134     }
135 
136 ?>
#19
+
 /var/www/tvampire2/data/www/gtptabs.com/index.php(15): CApplication->run()
10 
11     // Подключаем файл инициализации Yii
12     require_once('/var/www/tvampire2/data/frameworks/yii-1.1.13.e9e4a0/framework/yiilite.php');
13 
14     // Создаем экземпляр приложения и запускаем его
15     Yii::createWebApplication('protected/config/main.php')->run();
16 
17     
18 ?>
2016-03-10 08:02:01 Apache/2.2.27 (CentOS) Yii Framework/1.1.13