PHP菜鸟博客_共同学习分享PHP技术心得【PHP爱好者】
msyql时间戳函数用法
2021-4-14 菜鸟站长
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();

发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容