Evolving a MySql query from random ORDER BY RAND() to a weighted selection algorithm of the roulette algorithm type I have a MySql table “regalos” with the following structure: