Re: Re: Dear Lazy Web: Pseudo Randomisation Strategies on Listing Websites

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 20, 2010 at 9:05 AM, Colin Guthrie <gmane@xxxxxxxxxxxxxx> wrote:
> Thanks everyone for responses.
>
> 'Twas brillig, and Nathan Rixham at 20/08/10 13:17 did gyre and gimble:
>> if you use mysql you can seed rand() with a number to get the same
>> random results out each time (for that seed number)
>>
>>   SELECT * from table ORDER BY RAND(234)
>>
>> Then just use limit and offset as normal.
>
> This is a neat trick! Yeah that will avoid the need for the static
> lookup table with 32 randomised columns.

Would it work to return a list of some limited number of randomly
ordered "featured" listings/items on the page, while leaving the full
list ordered by whatever natural ordering (by date, order entered,
alphabetical, etc.)? That gives every owner a chance to appear in a
prominent spot on the page while solving the issue you cited about
page breaks (and SEO if that is a concern). You can still use any of
the suggestions that have been discussed to determine how frequently
the featured items list is reseeded to help make caching practical.

Just a thought.

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux