Apologize for my poor English.
I have not been programmed at about 4 years, so I need some help. There is a need to do photo analysis system for educational purposes. To encourage more voting, script chosen random winner, who are voting for at least 15 times a week.
**
I need a script that, chosen random (userID), who are voting for at least 15 times a week.
If there is more than one, script randomly selects a winner (preference to those who have never won).
In this example, according to the winner should show every Monday.
The week starts on Monday at 00:00:00 and ends on Sunday at 23:59:59.
Server: Linux, Apache 2, PHP 5, MySQL 5
table 'ExampleTable'
$StartTime = '2010-11-01'; // Voting begins
$EndTime = '2010-12-05'; // Voting ends
$MinRecord = '15'; // minimal records in the last seven days (week) of the table "ExampleTable"
$MaxWin = '1'; // max winner of the week.
table 'Votings'
VoteID (INT)
GalleryID (INT)
PictureID (INT)
UserID (INT)
Voting (TINYINT)
VoteTime (DATETIME)
table 'winners'
winID
galleryID
userID
winnerDay (DATETIME)