Pagiate contain
I have a search function built based off the hoc_joins tutorial by Nate inthe Bakery. Now the search runs fine searching thru 2 associated HABTM tables matching up items the user selects. My last line is : $data = $this-paginate('Post', array('Post.id' = $posts)); but that is pulling model data unrelated to the search (its running a query everywhere a Post.id matches any table found inthe db, hasOne, hasMany, HABTM) How can I cut out models from being queried with contain in pagination? Tried a few ways but nothing Dave --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagiate contain
On Fri, June 19, 2009 1:24 pm, Dave Maharaj :: WidePixels.com wrote: I have a search function built based off the hoc_joins tutorial by Nate inthe Bakery. Now the search runs fine searching thru 2 associated HABTM tables matching up items the user selects. My last line is : $data = $this-paginate('Post', array('Post.id' = $posts)); but that is pulling model data unrelated to the search (its running a query everywhere a Post.id matches any table found inthe db, hasOne, hasMany, HABTM) How can I cut out models from being queried with contain in pagination? Tried a few ways but nothing $this-paginate['contain'] = array() ; -- Mike Karthauser Managing Director - Brightstorm Ltd Email: mi...@brightstorm.co.uk Web: http://www.brightstorm.co.uk Tel: 07939 252144 (mobile) Fax: 0870 1320560 Address: 1 Brewery Court, North Street, Bristol, BS3 1JS --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Pagiate contain
Sorry to bother. got it after all. var $paginate = array( 'limit' =10, 'contain' = array(... . . ))) ); Dave _ From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: June-19-09 9:55 AM To: cake-php@googlegroups.com Subject: Pagiate contain I have a search function built based off the hoc_joins tutorial by Nate inthe Bakery. Now the search runs fine searching thru 2 associated HABTM tables matching up items the user selects. My last line is : $data = $this-paginate('Post', array('Post.id' = $posts)); but that is pulling model data unrelated to the search (its running a query everywhere a Post.id matches any table found inthe db, hasOne, hasMany, HABTM) How can I cut out models from being queried with contain in pagination? Tried a few ways but nothing Dave --~--~-~--~~~---~--~~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---