CDbException

CDbCommand falló al ejecutar la sentencia SQL: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '0000-00-00' for column 'fpublicacion' at row 1. The SQL statement executed was: UPDATE `tb_noticia` SET `Id`=:yp0, `fecha`=:yp1, `nombre`=:yp2, `url`=:yp3, `tipo`=:yp4, `ubicacion`=:yp5, `visitas`=:yp6, `comentarios`=:yp7, `publicar`=:yp8, `relacionado`=:yp9, `contenido`=:yp10, `idusuario`=:yp11, `imagen`=:yp12, `fpublicacion`=:yp13, `ffinal`=:yp14, `palabras`=:yp15, `resumen`=:yp16, `megusta`=:yp17, `nomegusta`=:yp18 WHERE `tb_noticia`.`Id`=2816

/home/wwwmedicinahuma2/yii/framework/db/CDbCommand.php(358)

346         {
347             if($this->_connection->enableProfiling)
348                 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
349 
350             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
351             $message=$e->getMessage();
352             Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
353                 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
354 
355             if(YII_DEBUG)
356                 $message.='. The SQL statement executed was: '.$this->getText().$par;
357 
358             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
359                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
360         }
361     }
362 
363     /**
364      * Executes the SQL statement and returns query result.
365      * This method is for executing an SQL query that returns result set.
366      * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
367      * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
368      * them in this way can improve the performance. Note that if you pass parameters in this way,
369      * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
370      * Please also note that all values are treated as strings in this case, if you need them to be handled as

Stack Trace

#3
+
 /home/wwwmedicinahuma2/public_html/protected/controllers/NoticiaController.php(56): CActiveRecord->save()
51 */
52 public function actionView($id)
53 {
54     $model = $this->loadModel($id);
55     $model->visitas = $model->visitas + 1;
56     $model->save();
57 
58 $this->render('view',array(
59 //'model'=>$this->loadModel($id),
60     'model'=>$model,
61 ));
#18
+
 /home/wwwmedicinahuma2/public_html/index.php(16): CApplication->run()
11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
12 define('SIGLAS','UAE');
13 
14 require_once($yii);
15 Yii::setPathOfAlias('vendor', 'protected/vendor');
16 Yii::createWebApplication($config)->run();
2024-03-29 02:39:53 Apache Yii Framework/1.1.16