为了账号安全,请及时绑定邮箱和手机立即绑定

thinkphp查询某个时间段的数据

thinkphp查询某个时间段的数据

ITMISS 2018-08-29 09:09:50
数据库中有个结束日期,如何在查询的时候根据当前时间去计算差,希望能给个解决办法。最好能写一下。谢谢
查看完整描述

1 回答

?
qq_遁去的一_1

TA贡献1725条经验 获得超7个赞

thinkPHP 有两个执行原生sql的  方法

你可以  取这个范围的作为条件然后查询就可以了  

12$Model->query('select * from think_user where status=1');$Model->execute('update think_user set status=1 where id=1');


查看完整回答
反对 回复 2018-09-30
  • 1 回答
  • 0 关注
  • 3226 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信