> Hi List,
> I have a client who wants to discuss an online scratch card.
> The fancy Flash front end to it I'm not concerned about for now.
> What I am wondering is how the winning cards are dealt with. Would I
> generate 10,000 cards up front with x winners and the issue of keeping these
> numbers secure.
> Or would I generate cards randomly with there being a possibility there are
> no winners in a given batch, or God forbid there are more winners in a batch
> than the suits have budgeted for.
> Anyone have any experience of this sort of thing.
> Mark Palmer, Pageworks
> T: 01902 620500 F: 01902 620440
> E: [hidden email] W: www.pageworks.co.uk
If you have defined the number of cards you can use
You can create a table that contain all cards
An other table PlayedCard
An other table Prices containning
A card can only be played one time
So to select unplayed cards
SELECT .... FROM cards LEFT JOIN PlayedCard USING cardID
WHERE PlayedCard.cardid IS NULL.
A Card Can only have on price
To Select the price you need to add a priceID col in Cards table