From 3f67a1277a514512d4b5f53e0e43cb71c7943ab5 Mon Sep 17 00:00:00 2001 From: wangxiyu191 <910741878@qq.com> Date: Wed, 8 Jun 2016 10:36:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DsetInc=20setDec=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=A4=84=E7=90=86=E4=B8=8E=E5=85=B3=E9=94=AE=E5=AD=97?= =?UTF-8?q?=E9=87=8D=E5=90=8D=E7=9A=84=E5=AD=97=E6=AE=B5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setfield时给field加上`` --- ThinkPHP/Library/Think/Model.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ThinkPHP/Library/Think/Model.class.php b/ThinkPHP/Library/Think/Model.class.php index df50e0054..8b31c42ad 100644 --- a/ThinkPHP/Library/Think/Model.class.php +++ b/ThinkPHP/Library/Think/Model.class.php @@ -925,7 +925,7 @@ public function setInc($field, $step = 1, $lazyTime = 0) $step = '-' . $step; } } - return $this->setField($field, array('exp', $field . '+' . $step)); + return $this->setField($field, array('exp', '`' . $field . '`+' . $step)); } /** @@ -949,7 +949,7 @@ public function setDec($field, $step = 1, $lazyTime = 0) $step = '-' . $step; } } - return $this->setField($field, array('exp', $field . '-' . $step)); + return $this->setField($field, array('exp', '`' . $field . '`-' . $step)); } /**