【TP5.1】关于使用时间条件查询

版权声明:咔咔 来自https://blog.csdn.net/fangkang7 https://blog.csdn.net/fangkang7/article/details/89633348

author:咔咔

wechat:fangkangfk

在之前使用tp5进行时间查询的时候,使用的条件一直都是

where['time'] = ['>',time()];

但是在tp5.1使用这个就查询不出来数据了,所以在tp5.1进行查询时需要使用

$res = $this->userExchangeModel->where($where1)->whereTime('ue_validTime','>',time())->find();

猜你喜欢

转载自blog.csdn.net/fangkang7/article/details/89633348
今日推荐