在yii中存储来自后视图的评论数据

i can get the form of comment in the post by the following code..

<?php $comment= new Comment();
        $this->renderPartial('/comment/_form',array('model'=>$comment,)); 
?>

but now it is require that the data fill in the comment form of post view is store in the database. Another problem, when fill data in the comment form of create new comment it creates 2 similar record in the databse.

Your problem is not very clearly explained, but form what I understand, you should try looking in to CFormModel and its validators.

Let me know if you would like to discuss details.