I have a city table with: "name" and "population". I want to select randomly a city, but based in the population.
New York - 19.000.000 City 2 - 1.000.000
So randomly I have 19X more chance to get "New York" than "City 2".
Of course this table has much more cities.
Aucun commentaire:
Enregistrer un commentaire