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
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
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