Ejemplo n.º 1
0
 /**
  * 更新一组数据
  * @param array $data 更新的数据
  * @param array $params update的参数列表
  * @return bool
  * @throws \Exception
  */
 public final function sets($data, $params)
 {
     if (empty($params)) {
         throw new \Exception("Model sets params is empty!");
     }
     $selectdb = new SelectDB($this->db);
     $selectdb->from($this->table);
     $selectdb->put($params);
     return $selectdb->update($data);
 }