Chris Hartjes' Blog: Custom CakePHP 1.2 Pagination Queries
Chris Hartjes has posted some custom queries that showcase the CakePHP framework's paginaton capabilities:
Okay, so it turns out that the paginate() method that is used to generate the data that you (oddly enough) paginate through takes the same arguments as Model::findAll(). So, if you want to use your own query, you simply create a 'paginate' method for your model.
His queries show the two parts of the equation - fetching the paginated results themselves and grabbing what the current page number is (like "page 7 of 23").
The historic takeover of Fannie Mae and Freddie Mac, which could come as soon as this weekend, moved to the forefront of the presidential campaign Saturday.
In the arena that night, the whole last minute was drowned out by cheers — and then when the soaring music swelled, the confetti rained down as the harbinger of balloons and the hopeful first family took the stage, forget about it — it was a perfect end to a convention that last Monday, no one even knew if it would happen. But it did, and I'm so glad to have been there.