попробовал
CDbException
CDbCommand не удалось исполнить SQL-запрос: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-2--1' for key 'PRIMARY'. The SQL statement executed was: call usecash(?,2,0,2,0,1000000,1,
@ERROR). Bound with 0=NULL
/var/www/expw.net/htdocs/framework/db/CDbCommand.php(354)
342 return $n;
343 }
344 catch(Exception $e)
345 {
346 if($this->_connection->enableProfiling)
347 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
348 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
349 $message = $e->getMessage();
350 Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
351 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
352 if(YII_DEBUG)
353 $message .= '. The SQL statement executed was: '.$this->getText().$par;
354 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
355 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
356 }
357 }
358
359 /**
360 * Executes the SQL statement and returns query result.
361 * This method is for executing an SQL query that returns result set.
362 * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
363 * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
364 * them in this way can improve the performance. Note that if you pass parameters in this way,
365 * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
366 * binding methods and the input parameters this way can improve the performance.
Stack Trace
#0
–
/var/www/expw.net/htdocs/protected/models/Gold.php(65):
CDbCommand->
execute(array(null))
60
61 $gold1 = User1::model()->find('name=:name', array(':name' => $this->name));
62
63 $connection = Yii::app()->db2;
64 $command = $connection->createCommand("call usecash(?,2,0,2,0,1000000,1,
@ERROR)");
65 $command->execute(array($gold1->ID));
66
67 $go = new Gold();
68 $go->userid = $gold->ID;
69 $go->save(false);
70 }
#1
–
/var/www/expw.net/htdocs/protected/controllers/ServiceController.php(27):
Gold->
addgold()
22 {
23 $sea = Gold::model()->find('userid=?', array($gold3->ID));
24
25 if($sea == null)
26 {
27 $model->addgold();
28 Yii::app()->user->setFlash('notice', "<strong>Успешно. Голд придет в течении 10-15 минут. <br /><br /><br /> <br /></strong>");
29 }
30 else
31 {
32 Yii::app()->user->setFlash('notice', "<strong>Вы уже пополняли. <META HTTP-EQUIV='REFRESH' CONTENT='2; URL=/service/gold'><br /><br /><br /> <br /></strong>");
#2
+
/var/www/expw.net/htdocs/framework/web/actions/CInlineAction.php(50):
ServiceController->
actionGold()
#3
+
/var/www/expw.net/htdocs/framework/web/CController.php(309):
CInlineAction->
runWithParams(array())
#4
+
/var/www/expw.net/htdocs/framework/web/CController.php(287):
CController->
runAction(CInlineAction)
#5
+
/var/www/expw.net/htdocs/framework/web/CController.php(266):
CController->
runActionWithFilters(CInlineAction, array())
#6
+
/var/www/expw.net/htdocs/framework/web/CWebApplication.php(276):
CController->
run("gold")
#7
+
/var/www/expw.net/htdocs/framework/web/CWebApplication.php(135):
CWebApplication->
runController("service/gold")
#8
+
/var/www/expw.net/htdocs/framework/base/CApplication.php(162):
CWebApplication->
processRequest()
#9
–
/var/www/expw.net/htdocs/index.php(13):
CApplication->
run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
2014-12-25 16

56 nginx/1.4.7
Yii Framework/1.1.10