Weigting a random selection
| From: | John Hawkins | Date: | Fri, 28 Dec 2001 23:38:24 +0000 |
| Subject: | Weigting a random selection | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-15255@lists.php.net to get a copy of this message | ||
I have an internal project I'm working on where I
would like to randomly send visitors to different
pages, but, I want to be able to give some pages a
better chance of getting shown.
So, my thought was that I would have a database table
that had records for each URL and it's weight. Then,
the program could randomly choose a record, but,
taking into account the weighting.
My question is, how in the heck do I make it read the
weighting for each record and then properly figure out
how to make a random selection basted on the weights?
Does that make sense?
Any help is greatly appreciated!
John Hawkins
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com