This caught my eye whilst doing some investigations into smarter paging. A generic piece of sql that works for generic paging.
Looks great on paper, wondering if anyone could comment on possible downsides to this generic approach that's presented.
anyway, enough of the twaddle, take a look here:
I've copied the code from here and TBH'd it, so might pop that version up at some point once i've gathered a few comments from peeps here.