msyql时间戳函数用法

  • 内容
  • 评论
  • 相关
select unix_timestamp(now());      结果是:1618394534
select current_timestamp();          结果是:2021-04-14 18:02:14
select now();                               结果是:2021-04-14 18:02:14


实例:查询下单超过3分钟未付款的订单

 $where = " pay_status='0'   and  unix_timestamp(now())-add_time>3*60 ";
$orderlist = Db::table( 'client_order_info' )->where( $where )->order( 'order_id', 'asc' )->select();

本文标签:

版权声明:若无特殊注明,本文皆为《菜鸟站长》原创,转载请保留文章出处。

本文链接:msyql时间戳函数用法 - http://wlphp.com/?post=262

发表评论

电子邮件地址不会被公开。 必填项已用*标注