On 25 Sep., 20:28, brian <bally.z...@gmail.com> wrote:
> On Fri, Sep 25, 2009 at 8:47 AM, braaan <martin.platt...@gmail.com> wrote:
>
> > i can't use ORDER BY RAND() on every page because
> > then the user would get different results on every refresh.
>
> Well, it wouldn't be very random, otherwise, would it?

you are right, i meant not a new ORDER BY RAND() query on every result-
page. example: results on page 1 will change when i change the page to
2 and then back to 1 again. that's not what i want.

>
> > i thought about doing the data-fetching myself (andextendif there
> > are to less results) and give it to the pagination manually, is this
> > possible?
>
> What do you mean by "doing the data-fetching myself " and "manually"?

what i want to do:
1) search for the users string myself
2) if result-count < X, then add some random results.
3) use this resultset (real results + applicable random results) and
do pagination with exactly this result-set. (not doing a RAND()-query
on every page-change.)

do you know what i mean?

greets, thank you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to