Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting a Winner
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00226460
Message ID:
00226537
Views:
22
>>Our company is creating a sweepstakes application that will randomly select a winner each month. We are having difficulty putting code together that will help us select a winner. We are using one table that has two fields in it. A three letter code (AFS) field and a dateime field. Does anyone have any simple code that might be helpful in selecting a winner or have any ideas on how to generate a winner.
>
>You could just pick a random-selection winner based on the number of records using RAND(), if there's no other criteria involved...

WinnerId = Random_Priority_List("Relatives", "Friends","Others")
:)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform