Reply to Find random stuff

Your name:

Reply:


Posted by Joe on 01/07/06 23:00

Hi
I need some help doing a easy php/sql solution to a random selection with
rated stuff.
I have a table like:

Name Rated
--------------
Thompsen 500
Milla 10
Jensen 1

Means that the name Thompsen appears 50 times as often as Milla and 500
times as often Jensen.

I now need some scripting that counts the total ratefactor like
SELECT sum(Rated) FROM Table
In this case 511
And then make a random value between 1 and 511 and then print out the name,
which in this case will be Thompsen 500 of 511 times (in avg)

I need a quick way to find a name based on the Rated factors, any help?

[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

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