Been messing around with this for quite a while now. I want to request
Pagination using Contain on my Post...but I want to select specific fields
to query from Post also.

The Post has a lot of useless info not needed in the pagination layout so
all I need from the Post is Post.title, Post.description and Post.id.

Then I grab the User info User.id', 'User.city', 'User.company and the
State.abrev
 
I have:
 
$this->paginate['Post'] = array(
     'conditions'  => array('status' => '0'),
     'limit' => 15,
        //this is commented out because when it runs the contain State.abrev
does not return anything
     //'fields' => array('Post.id', 'Post.title' , 'Post.created'),
     'order' => array('Post.created' => 'DESC'),
     'contain' => array(
          
      'User' => array(
      'fields' => array('User.id', 'User.city', 'User.company'),
       'State' => array(
       'fields' => array('State.abrev')
       ))));

Ideas?

thanks
 
Dave 


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

Reply via email to