Friday, September 25, 2009

Search-Engine: Extend results with random records if there are no 'real' results

Hello,
i'm coding a very basic search-engine at the moment.
the admin is able to add some records manually and then users can
search for them.
as there are not many records added by the admin the results are 0
quite often.
if the result-count is 0 i want to extend the results with random
records.

i don't know how to do this, especially with the pagination.
one problem is, that i can't use ORDER BY RAND() on every page because
then the user would get different results on every refresh.
i thought about doing the data-fetching myself (and extend if there
are to less results) and give it to the pagination manually, is this
possible?

what would u suggest?
thank you!
greets

--~--~---------~--~----~------------~-------~--~----~
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: