mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
修正软删除的withTrashed方法 Query类增加removeWhereField方法
This commit is contained in:
@@ -938,6 +938,22 @@ class Query
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 去除某个查询条件
|
||||
* @access public
|
||||
* @param string $field 查询字段
|
||||
* @param string $logic 查询逻辑 and or xor
|
||||
* @return $this
|
||||
*/
|
||||
public function removeWhereField($field, $logic = 'AND')
|
||||
{
|
||||
$logic = strtoupper($logic);
|
||||
if (isset($this->options['where'][$logic][$field])) {
|
||||
unset($this->options['where'][$logic][$field]);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 指定查询数量
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user