I have this for my find all ;
$count = 10;
$params = array(
'conditions' => array(
'Entry.featured' => 1),
'fields' => array(
'Entry.id',
'Entry.title'),
'limit' => $count,
'order' => 'rand()',
'contain' => false);
return $this->find('all', $params);
So I have 100 dummy entries in th db but it always pulls the same $count and
just orders them differently.
How do I get 10 random records?
What am I missing here?
Thanks
Dave
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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
To unsubscribe from this group, send email to
cake-php+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.