DATE_ADD函数常用于计算超时的订单

 select id, user_id, time, type, money, wx_trade_no, status, discounts_id from details where type=1 and DATE_ADD(time,INTERVAL 5 MINUTE) <= now() and status=0

查询订单信息超过5分钟的

posted @ 2019-08-30 23:46  Angry-rookie  阅读(133)  评论(0)    收藏  举报