On Wednesday, November 2, 2011 3:00:01 AM UTC+7, Yves S. Garret wrote:
> if(!empty($this->data['Provider']['last_name'])) {
> $this->set('provider', $this->Provider->find('all',
>
> array('conditions' =>
> array(
>
> 'Provider.last_name LIKE' => $this->data['Provider']['last_name'].'%'))));
> }
>
Hmm, the find() will return all data. To enable pagination, the result must
be processed by Controller::paginate()
$this->set('provider', $this->paginate('Provider', $conditions));
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php