Home » yii framework

insert current date to mysql automatically in yii framework

here is example to show how could you insert current date before save in yii ! just use beforSave function in your model, public function beforeSave(){ $mysqldate = date( ‘Y-m-d H:i:s’); $this->addedDate = $mysqldate; return parent::beforeSave(); } addedDate…

Read More »