mysql 时间转换和计算

select UNIX_TIMESTAMP(FROM_UNIXTIME(add_time-86400,'%Y-%m-%d')) from mht_order WHERE order_id=2591

TP框架中实现自定义查询条件  $where['_string'] = "(f.log_id IS NOT NULL and ".time().">=UNIX_TIMESTAMP(FROM_UNIXTIME(b.depart-86400,'%Y-%m-%d')))";

原文地址:https://www.cnblogs.com/xie-xiao-chao/p/8183575.html