mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
增加日期和时间查询方法 datetime
This commit is contained in:
@@ -1227,6 +1227,20 @@ class Query
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日期或者时间
|
||||
* @access public
|
||||
* @param string $field 日期字段名
|
||||
* @param string $op 比较运算 > < between not between
|
||||
* @param string|array $range 比较范围
|
||||
* @return $this
|
||||
*/
|
||||
public function datetime($field, $op, $range = [])
|
||||
{
|
||||
$this->where($field, strtolower($op) . ' time', $range);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据表信息
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user