NogDog wrote:Well, I guess you could put the whole lot inside a loop, but it's going to be very inefficient and might time out on you if it keeps randomly matching values in the DB. If you care to tell us what it is, functionally, that you are trying to accomplish, I suspect we can come up with a more optimal solution.
hi NogDog,
Thanks for looking at this 🙂
It is a for an online prize draw.
The winning tickets are generated from a range of random numbers and published.
Then this is part of the code that generates the entry numbers from the same range of random numbers when a link is clicked on.
And instantly tells the participant if they have won a prize or not.
I have it all setup and working, but what is happening is that when a number is drawn it is not excluded from the contest, the same number can be drawn again.
I have it set so it does not award the prize again but I would like once a number is drawn it cannot be drawn again.
I hope I explain this clearly 🙂
Thom