Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Math: Doubles in randomly sorted article list?
I wonder:
If i set an article list (so more than one article) to sort=“rand()”: Do i really get each possible article only once?
In other words, in a list of ten articles from a pool of 10, is there a high risk of doubles?
If not i presume, that an array has been randomly filled with possible article IDs, before the list is rendered, and each item rendered is no longer present in that array?
If that array exists, can i access it and how?
Thanx for any insights!
Last edited by jayrope (2011-07-27 16:19:16)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: Math: Doubles in randomly sorted article list?
rand() is a SQL function. There’s no risk, I guess :)
Offline
Re: Math: Doubles in randomly sorted article list?
Yes, you’ll get each possible article only once. I think there is no guarantee though, that in n list refreshes, the same article won’t be on top every time, for example.
Last edited by maruchan (2011-07-27 19:10:39)
Offline
Re: Math: Doubles in randomly sorted article list?
maruchan wrote:
I think there is no guarantee though..
…which is the core concept of “randomness” ;)
Offline