您只需按照这种方式更新yii中的记录即可.
$user = User::model()->findByPk($userId); $user->username = 'hello world'; $user->password = 'password'; $user->update();
如何在yii中保存新记录?
$user = new User(); $user->username = 'hello world'; $user->password = 'password'; $user->save();
如何删除yii中的记录?
$user = User::model()->findByPk($userId); $user->delete()