mysql查超过15分钟未付款的订单,更新为失效状态

个人打开自己的订单时,才检查超过15分钟未付款的订单,

暂不使用机器人,更新状态,

Difference counter 差分计数器
订单超过15分钟.mysql的时间戳差分比较

$sql =  TIMESTAMPDIFF(MINUTE, order_statustime, now()) > 15;

mysql 时间类型

date 默认值0000-00-00 00:00:00

timestamp 默认值0000-00-00 00:00:00

int(11) 默认值0  适合存时间戳

mysql 函数管理

select now();

原文地址:https://www.cnblogs.com/bj-tony/p/5764883.html