News Feed
Jobs Feed
Sections




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

Debuggable Blog:
How to paginate a CakePHP search over a HABTM relation without hacking the core
November 21, 2008 @ 16:38:30

On the Debuggable blog Tim Koschutzki has a new post showing how to get CakePHP to play nicely with a HABTM query and pagination.

The problem is that a user inputs some search criteria into a form, the resultset exceeds 30 rows for example and the user must be able to browse through the resultset via different pages. [...] This problem itself is in fact not much of a problem. We just need to store the form conditions somewhere and then hack it together. So what we are going to do is that we raise the difficulty bar a lot more by trying to get the pagination work over a HABTM relation.

Code is included for the model and controller to get the job done.

0 comments voice your opinion now!
habtm relationship controller model cakephp framework


blog comments powered by Disqus

Similar Posts

Fabien Potencier: Packing a Symfony full-stack Framework Application in one File - Introduction

Zend Developer Zone: Use LiveUser for Authentication & Permission Management with the Zend Framewok

Pádraic Brady's Blog: Complex Views with the Zend Framework - Part 7: Zend_View Enhanced

The Northclick Blog: Announcing "dropr" - the message queue framework for PHP

Debuggable Blog: How to do Group By conditions in Model find() calls in the CakePHP RC1


Community Events











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


composer podcast language hack install release code example component symfony2 overview package security framework facebook unittest opinion application hhvm introduction

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