RT,这两个字段都是整形的时间戳数字,然后我使用下面方法: $maps['lastime'] = ['exp', "lastime > respontime"];
结果: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lastime > respontime ) ORDER BY id desc LIMIT 6000' at line 1[/var/……/thinkphp/library/think/db/Connection.php:388]
1
abccccabc 2018-01-06 08:58:18 +08:00
试下:where('lasttime', '>', 'respontime')
|
2
chelsea2019 2018-05-07 00:36:08 +08:00 via iPhone
可以加一下你 qq 和微信吗
|
3
crist OP @chelsea2019 不用了,答案是$maps['lastime'] = ['exp', "> respontime"];
|