From c315a791545733391c15e42bc747e34293d36a99 Mon Sep 17 00:00:00 2001 From: colly_wyx <wangyixiong_007@163.com> Date: Sat, 28 Apr 2018 14:50:19 +0800 Subject: [PATCH] 更新版本 --- application/core/System/Model/Base.php | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/application/core/System/Model/Base.php b/application/core/System/Model/Base.php index f4cbf7e..80a189b 100644 --- a/application/core/System/Model/Base.php +++ b/application/core/System/Model/Base.php @@ -50,8 +50,37 @@ return $this->db->insert($this->table, $data); } - public function update($data, $query){ + /** + * ������ + * @param [type] $data [description] + * @param [type] $query [description] + * @return [type] [description] + */ + public function update($data, $query = array()){ return $this->db->update($this->table, $data, $query); } + /** + * ������ + * @param [type] $params [description] + * @return [type] [description] + */ + public function aggregate($params){ + return $this->db->aggregate($this->table, $params); + } + + /** + * ������[������������������] + * @param array $query [description] + * @return [type] [description] + */ + public function delete($query = array()){ + if(!empty($query)) + return $this->db->delete($this->table, $query); + else + return false; + } + + + } -- Gitblit v1.8.0