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')))";

posted @ 2018-01-03 14:24  xc_flying  阅读(140)  评论(0编辑  收藏  举报