public function actionDetails($id) { $video = Video::model()->findByPk($id); $video->total_view += 1; $video->save(); $this->render('details',array( 'model'=>$this->loadModel($id), )); }
public function actionDetails($id) { $video = Video::model()->findByPk($id); $video->saveCounters(array('total_view'=>1)); $this->render('details',array( 'model'=>$this->loadModel($id), )); }
public function actionDetails($id) { Video::model()->updateCounters( array('total_view'=>1), array('condition' => "id = :id"), array(':id' => $id), ); $this->render('details', array('video' => $video)); }