update() 공개 메소드

Compiles an update string and runs the query
public update ( $table = '', $set = NULL, $where = NULL, $limit = NULL ) : object
리턴 object
예제 #1
0
 public function update()
 {
     $this->_set_row();
     $this->db->update($this->_forged_join());
     $this->_clear_forged_join();
     if ($this->_record_is_changed()) {
         return $this->db->affected_rows() > 0;
     }
     return true;
 }
예제 #2
0
 /**
  * 更新数据
  * @param array $set 数据集合(key/value)
  * @param array|string $where 条件
  * @return int $effct_rows_count 修改到的记录条数
  */
 public function update(array $set, $where)
 {
     $this->where($where);
     $this->db->update($this->_name, $set);
     return $this->db->affected_rows();
 }