Say: select id from en_download where navid in (94) and (inputtime>='2022-08-10 10:09:33' and inputtime<='2023-08-10 10:09:33') and isdisplay=1 order by paixu asc,inputtime desc,id descSay: select * from en_download where navid in (94) and (inputtime>='2022-08-10 10:09:33' and inputtime<='2023-08-10 10:09:33') and isdisplay=1 order by paixu asc,inputtime desc,id desc limit 0,12