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; }
/** * 更新数据 * @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(); }