CDbException

CDbCommand falló al ejecutar la sentencia SQL: SQLSTATE[HY000]: General error: 1364 Field 'browser' doesn't have a default value. The SQL statement executed was: INSERT INTO `errors` (`title`, `message`, `aux`, `administrator_id`, `user_id`, `ip`, `date`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6)

/home/superdt/yii/framework/db/CDbCommand.php(338)

326             return $n;
327         }
328         catch(Exception $e)
329         {
330             if($this->_connection->enableProfiling)
331                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().')','system.db.CDbCommand.execute');
332             $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;
333             $message = $e->getMessage();
334             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
335                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
336             if(YII_DEBUG)
337                 $message .= '. The SQL statement executed was: '.$this->getText().$par;
338             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
339                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
340         }
341     }
342 
343     /**
344      * Executes the SQL statement and returns query result.
345      * This method is for executing an SQL query that returns result set.
346      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
347      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
348      * them in this way can improve the performance. Note that if you pass parameters in this way,
349      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
350      * binding methods and  the input parameters this way can improve the performance.

Stack Trace

#2
+
 /home/superdt/protected/models/Errors.php(133): CActiveRecord->save()
128             /*if(isset(Yii::app()->session['session_admin_id']))
129                $error->administrator_id = Yii::app()->session['session_admin_id'];
130             if(isset(Yii::app()->session['session_user_id']))
131                 $error->user_id = Yii::app()->session['session_user_id'];*/
132             
133             if($error->save())
134                 return true;
135             else{
136                 print($title);
137                 print($message);
138                 print($aux);
#3
+
 /home/superdt/protected/controllers/SiteController.php(127): Errors::log("Error en SiteController/actionIndex", "CDbCommand falló al ejecutar la sentencia SQL: SQLSTATE[HY000]:...", "")
122                 $bestTournamentPlayers = PlayerRoundPoints::getBestFromTournament($firstRound->id, $round->id);*/
123                 $this->render('index',array(/*'bestTournamentPlayers'=>$bestTournamentPlayers , */'uruguayanTournamentTeams'=>$uruguayanTournamentTeams, 'currentMatches'=>$currentMatches, 'nextMatches'=>$nextMatches, 'previousMatches'=>$previousMatches, 'uruguayanTournament'=>$uruguayanTournament,'bestRoundPlayer'=>$bestRoundPlayers,'bestTeamsSuperDtTournament'=>$bestTeamsSuperDtTournament));
124             }
125             catch (Exception $ex)
126             {
127                     Errors::log("Error en SiteController/actionIndex",$ex->getMessage(),'');
128                     $this->redirect('/Site/userError');
129             } 
130     }
131         public function actionTestOldDb(){
132             echo ("1</br>");
#11
+
 /home/superdt/public_html/index.php(27): CApplication->run()
22 defined('YII_DEBUG') or define('YII_DEBUG',true);
23 // specify how many levels of call stack should be shown in each log message
24 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
25 
26 require_once($yii);
27 Yii::createWebApplication($config)->run();
2020-10-22 20:25:36 Apache Yii Framework/1.1.7