View Full Version : daily lottery - random?
EasyTarget
03-29-2006, 03:57 PM
I have 1 user who has won the daily lottery 10 times in a row, despite that fact that others are buying tickets as well. Is there something he's figured out like maybe the first person to buy tickets after the last lottery ends will always win? How does it choose a winner?
CMX_CMGSCCC
04-01-2006, 01:37 AM
Nope, its a random chooser. All it does is generate a random number from 0 to the number of tickets that are sold and it chooses that number as the entry from the MySQL table.
-CMX
subnet_rx
06-19-2006, 04:41 PM
I've had the same problem, I only have a weekly lottery and a monthly, but I have 3 users who have won multiple times each.
CMX_CMGSCCC
06-20-2006, 08:34 PM
Maybe noone is buying tickets.
If only 3 people buy tickets all the time, then of course 1 of the 3 will be the winner.
-CMX
dan35
06-20-2006, 09:20 PM
Same problem here! My board users complain why I always win :)
CMX_CMGSCCC
06-20-2006, 09:25 PM
How many tickets are purchased daily at ur sites?
-CMX
dan35
06-20-2006, 09:34 PM
3-10 weekly. Usually I'm the first buyer.
CMX_CMGSCCC
06-20-2006, 09:37 PM
The first buyer is not always the winner, it just uses php's rand(1, xtickets) to generate which one has one.
-CMX
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.