我有疑问:
SELECT ID
FROM VACANCIES
WHERE CATEGORYID = 1
AND VISIBLE = '1'
AND user_enable = '1'
AND DATA >= '2012-08-10 10:54:46'
AND torder >= 0
AND ID > 570153
ORDER BY torder ASC, DATA ASC, ID ASC
LIMIT 1
我得到结果 ID - 570164 作为前一个键,这是错误的结果:正确的结果是 567556
570164 | ROW 1 | 2012-08-10 11:27:39
567556 | ROW 2 | 2012-08-10 10:55:53
570153 | ROW 2 | 2012-08-10 10:54:46
有没有办法获得 prev id ?注意:我按日期下订单,但日期可以相等,prev id 可以小于当前 ID