qinhehan 2011-06-27 17:52:09 3668次浏览 8条回复 0 0 0
$profile = Yii::app()->db->createCommand()->update('User', 
  array(
    'TrueName' => $truename,
    'Sex' => $sex,
    'Mobile' => $mobile,
    'Tel' => $tel,
    'Addr' => $addr,
    'ZipCode' => $zipcode,
    'Remark' => $remark,
  ),
  'id=:id', array(':id'=>$userId)
);

这种写法正确么?

您需要登录后才可以回复。登录 | 立即注册