遇到一个很奇怪的问题, 关于原生 sql 和 ORM 的
self::where('quote_id', 0)->where('created_at', '>', '(unix_timestamp(now())-`time`*3600)')->get();
DB::select('select * from `order` where `quote_id` = 0 and `created_at` > (unix_timestamp(now())-`time`*3600)');
遇到个怪事, 上面的orm和下面的原生sql执行出来结果不一样, orm执行完我打印了完整的sql, 和下面那句是一模一样的, 我想不明白为什么出来结果会不一样?
有没有人遇到这种情况?
推荐文章: