Quantcast
Channel: PHPDeveloper.org
Viewing all articles
Browse latest Browse all 4

Debuggable Blog: How to paginate a CakePHP search over a HABTM relation without hacking the core

$
0
0

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.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images