Paginate returns results paginated. Find returns unpaginated data - S On 13 Nov 2011 16:51, "Daniel" <[email protected]> wrote:
> On Nov 13, 11:01 am, phpMagpie <[email protected]> wrote: > > You can't paginate data you have fetched with $this->Model->find() you > > must use $this->paginate(). > > > > HTH, Paul. > > OK, here is what I tried: > > $this->set( > 'category', > $this->paginate( > $this->Category->find( > 'first', > array( > 'conditions' => array('Category.id' => $id), > 'contain' => array( > 'Post' => array( > 'User' => array( > 'id', > 'username' > ) > ) > ) > ) > ) > ) > ); > > I now get these errors: > > Notice (8) : Array to string conversion [CORE\cake\libs\model > \datasources\dbo_source.php, line 2204] > Warning (512) : SQL Error: 1054: Unknown column 'Category' in 'where > clause' [CORE\cake\libs\model\datasources\dbo_source.php, line 684] > > What am I doing wrong? > > Thanks. > > -- > 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 > -- 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
