Re: Best Practices/Method - Search to Return Results (With Paginate)

2007-12-05 Thread Dave Miller
http://tempdocs.cakephp.org/#TOC53292 Check out postConditions(). You can replace the findAll() with paginate(). So a search with the right input names can be as easy as: function search() { $this->set('data', $this->MyModel->paginate($this->postConditions($this->data))); } Dave Baz w

Re: Best Practices/Method - Search to Return Results (With Paginate)

2007-12-05 Thread Marcin Domanski aka kabturek
http://wiki.kabturek.info/paginating_search_results HTH On Dec 5, 3:57 pm, Baz <[EMAIL PROTECTED]> wrote: > Got a quick question. > > I'm trying to implement a custom search on a model that returns based on the > user's criteria. Basically I have a bunch of if statements and build up a > query

Best Practices/Method - Search to Return Results (With Paginate)

2007-12-05 Thread Baz
Got a quick question. I'm trying to implement a custom search on a model that returns based on the user's criteria. Basically I have a bunch of if statements and build up a query before I do a paginate(). My question is, how do I keep this current? Should I use the function with different paramet