Scratch cards

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Scratch cards

Mark Palmer
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.

Regards


Mark Palmer, Pageworks

T: 01902 620500            F: 01902 620440
E: [hidden email]    W: www.pageworks.co.uk



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Scratch cards

Olivier Miossec

Mark Palmer ?crit:

> 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.
>
> Regards
>
>
> 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  
with :

CardId


An other table PlayedCard
IdPlayed
cardId
Other informations


An other table Prices containning
IdPrice
Price
...

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
 




---
Olivier Miossec
AIM/ichat omiossec
--
http://www.lasso-developpeur.net
--

Need a Lasso consultant ?
(Lasso, Java, Databases Consultant ...)
http://www.lasso-developpeur.net/oliviermiossec/

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage