Quote (im_the_jew @ Jan 30 2017 08:46pm)
So i guess instead of tickets i can assign numbers. First person gets number 1 through whatever. So on and so fourth. How do i then use a number generator that will flucuate. Example.
Person a gets numbers 1 through 300. Person b gets 301 to 1000. Person c gets 1001 through 9000. My question is then how do i assign the number generator to only pick through those numbers. And they will vary every time, like person a could do 1 through 4300 the next time ect ect.
What I would to is create a simple database that stores every persons highest number and lowest number, so it might look like:
Code
name Low High
Joe 1 100
Dave 101 101
Sally 102 4000
And then generate a random number, X, and do something like
Code
SELECT name FROM ticket_table WHERE low <= x AND high >= x;
/e and then just clear the database after each drawing.
This post was edited by Mastersam93 on Jan 31 2017 07:07am