Reply to help needed w/prize draw script

Your name:

Reply:


Posted by cashmere on 10/09/06 20:44

hi-ya folks,
some big-hearted folks helped me here before and I'm hoping I'll be
lucky again!
Here's my prob: At work, they have a prize draw script (which I don't
have access to), and there are 5 winning nos. out of a total of 5000
numbers.
Currently a table is created in mysql that contains 5000 rows and
apparently this is slow because each time you use one of your virtual
tickets the number is compared to all the numbers in the table.
I rashly claimed I could solve the prob, and my idea was to just have 5
rows with the winning numbers where there would be a column containing
a randomly generated number that was re-generated every time a punter
had a go, and this number was compared to the ticket number.
But now I've been given more explicit instructions, namely the logic
has to be not in the table, but in the php. When a ticket is played,
the number of winning numbers is diminished from 5 to 4, if it was a
winner, or the losing numbers are diminished from 4995 to 4994 if it
was a losing number.
The draw is over when the number of winning numbers reaches zero,
obviously.
At this moment I don't have a clue where to start, even after some days
of pondering, so I would be verrrry grateful for any pointers.
TIA Dave

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация