改进insertAll方法

This commit is contained in:
thinkphp
2018-04-14 10:12:25 +08:00
parent 94384d1aba
commit 137ccfc458
2 changed files with 9 additions and 9 deletions

View File

@@ -883,7 +883,7 @@ class Query
*/
public function exp($field, $value)
{
$this->data($field, ['exp', $value]);
$this->data($field, $this->raw($value));
return $this;
}
@@ -1188,7 +1188,7 @@ class Query
*/
public function whereExp($field, $condition, $logic = 'AND')
{
$this->parseWhereExp($logic, $field, 'exp', $condition, [], true);
$this->parseWhereExp($logic, $field, 'exp', $this->raw($condition), [], true);
return $this;
}