set() public method

更新ID为$id的记录,值为$data关联数组
public set ( $id, $data, $where = '' ) : boolean
$id
$data
$where string 指定匹配字段,默认为主键
return boolean
Esempio n. 1
0
 public function toUpdateAvatar($id, $data, $where)
 {
     $result = parent::set($id, $data, $where);
     if (false === $result) {
         return ['code' => 1, 'data' => '', 'msg' => 'fail'];
     } else {
         return ['code' => 0, 'data' => '', 'msg' => 'success'];
     }
 }