开发者

Paginated chunk of bigger resultset *and* total resultset count in one query?

My personal holy grail of SQL (specifically MySQL) query building is this:

I wonder if 开发者_JS百科/ how it is possible to - in the same query - to get a paginated chunk of a bigger resultset (ie. page 2, with 20 per page, of 13000 total results) and the count of total results (in this example 13000).

I'm not saying that this is the best or most efficient way to get the two results (page of results and total result count) but I like a challenge and can never seem to do this in one query.

So, what do you say?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜