Reply to Choosing a random entry in a table by "weight"

Your name:

Reply:


Posted by alpha.beta0 on 05/27/07 16:10

I have a MySQL table of servers, I use RAND() to pick a random server
to use each time, but how can I add a number to each server entry that
allows it be to picked more often than the other 20 servers?

For example Server1's weight is 80 and Server2's weight is 40 and
hence Server1 is more likely to be picked than the others.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация