Thursday, September 3, 2009

Contain Condition

Sorry for the dumb question but I am trying to get a list of Users that have more than 5 posts. I want to query thru all posts where the any Post.user_id appears 5 times or more....
 
How do I add that in as a condition?
 
function __getTestCounts()
 {
  
  $params = array(
        'fields' => array(
           'Post.id',
           'Post.user_id',
           'Post.title'),
 'contain' => false));
   
  $q = $this->find('all', $params);
  return $q;
  
 }
 
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: