News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Hartjes' Blog:
Custom CakePHP 1.2 Pagination Queries
March 05, 2008 @ 20:54:00

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").

0 comments voice your opinion now!
cakephp pagination query framework page


blog comments powered by Disqus

Similar Posts

Ryan Malesevich's Blog: WP Plugins: WP-Wap, Make a WAP Version of Your Blog

Wolfgang Drews\' Blog: PHP Frameworks - to use or not to use?

ServerGrove Blog: Easily manage multilingual sites with the new TranslationEditorBundle for Symfony2

Brandon Savage's Blog: Learning Zend Framework: A Case Study

SitePoint PHP Blog: Zend_Filter Reviewed, Blacklist / Whitelist Filters


Community Events

Don't see your event here?
Let us know!


framework example language api community part2 composer yii2 series introduction programming interview application php7 list podcast symfony laravel project opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework