数据库查询时间段 查询时间段内订单操作

  • A+
所属分类:Mysql
// 数据库日期函数 查规定时间段内是否有记录

$map['_string'] = "doe.order_id is not null AND oe.order_id is not null AND 
(((UNIX_TIMESTAMP(oe.send_at)<='".$rent_start_date."')AND
(UNIX_TIMESTAMP(oe.receive_at)>='".$rent_end_date."')) OR 
((UNIX_TIMESTAMP(oe.send_at)<='".$rent_end_date."') AND 
(UNIX_TIMESTAMP(oe.receive_at)>='".$rent_start_date."')) OR
((UNIX_TIMESTAMP(oe.receive_at)>='".$rent_start_date."') AND 
(UNIX_TIMESTAMP(oe.send_at)<='".$rent_end_date."'))) ";

 

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信小程序
  • 我的微信小程序扫一扫
  • weinxin
Lion

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: