I'm running a contest on a website and I have 3215 entrants who are eligible for 5x Sony PSPs.
I believe the formula to count the odds is totalEntrants - prizes / prizes:
(3215-5)/5 = 642
so that's an odds of 642 to 1 of winning - is that right? ( I suck at math )
And in my table which contains 3215 rows in the database I would just select a random row like so?
SELECT * from entries
WHERE entries.won = 0
ORDER BY RAND()
LIMIT 1
Now I have one row, and I need to set the won
column to 1
so the entrant can't win again, then run it again? This is my first time doing it so I just want confirmation on if I'm doing it correctly.