Friday, July 2, 2010

Re: Can I do a custom find then paginate?

Louie,

You can specify conditions for paginate as stated here in the manual:
http://book.cakephp.org/view/165/Controller-Setup
You should end up with something along the lines of this,
http://bin.cakephp.org/view/1633497516


On Jul 2, 3:28 am, Louie Miranda <lmira...@gmail.com> wrote:
> Can I do a custom find (mysql full text search) then paginate?
>
> $this->Publication->recursive = 0;
>
> > $params = array('conditions'=>array(
> > "MATCH(Publication.ITEMCODE, Publication.ITEMKEYWORDS,
> > Publication.DESCRIPTION)
> > AGAINST ('Jazz')
> > "));
> > $results = $this->Publication->find('all', $params);
> > $this->set('results', $this->paginate($results));
>
> This one did not work properly? Any ideas?
>
> --
> Louie Miranda
> - Email: lmira...@gmail.com
> - Web:http://www.louiemiranda.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: