Welcome to WebmasterWorld Guest from 54.205.108.212

Forum Moderators: open

Message Too Old, No Replies

multiple queries, random userID from

     
8:19 am on Aug 28, 2010 (gmt 0)

New User

5+ Year Member

joined:Aug 27, 2010
posts: 4
votes: 0


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)
8:22 am on Aug 28, 2010 (gmt 0)

New User

5+ Year Member

joined:Aug 27, 2010
posts:4
votes: 0


before was wrong table name in comment

$MinRecord = '15'; // minimal records in the last seven days (week) of the table "Votings"
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members