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)); } /**