I want to create a table, with each row containing some sort of weight. Then I want to select random values with the probability equal to (weight of that row)/(weight of all
I'm not an expert in probability theory, but assuming you have a column called WEIGHT, how about
WEIGHT
select FIELD_1, ... FIELD_N, (rand() * WEIGHT) as SCORE from YOURTABLE order by SCORE limit 0, 10
This would give you 10 records, but you can change the limit clause, of course.