I typically do something like this:
I do a "lite" version of my select to get the number of rows I'm going to have, total. I then pass this number, the current page, and the results per page to a custom function which prints out a page list. I then repeat the full query, adding in the LIMIT syntax to get only a specific set of rows, which I then display.
Hope that helps...