开发者

Selecting specific values in a DB (sorta...)

Ok, I had a hard time coming up开发者_运维百科 with a title, as you can probably tell. Anyway, I need to select 5 items from a DB excluding the first one. More specifically, I have items in a DB, each with a specific, auto-incrementing ID. I need to select the first 5 after the item with the highest ID. What would be the best way to do this? Thanks!

-iMaster


The LIMIT clause:

SELECT * FROM table ORDER BY `id` DESC LIMIT 1, 5
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜