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").
Republican presidential candidate Sen. John McCain has chosen Gov. Sarah Palin to be his running mate. She would be the first woman to serve on a Republican presidential ticket.
AFP - Nigerian President Umaru Yar'Adua's anti-corruption drive has claimed another scalp with news Friday of the arrest of an ex-governor who allegedly embezzled millions of dollars of state funds.
AP - The NBA officially handed over the Seattle franchise to Oklahoma City about two months ago, and three trucks arrived downtown at headquarters on Friday.