ryanatdrewreysolutions Posted July 5, 2008 Share Posted July 5, 2008 Hello everyone, THIS IS NOT A SCRIPT REQUEST, JUST A REQUEST FOR HELP OR DIRECTION I am building a site that is pretty complicated for my level. Here is a workflow diagram i made and that i am working towards http://contest-site.com/ryan/workflow%20copy.jpg The goal is to create a special voting system. Users enter media they created - music, videos, drawings, essays, anything. only those who enter the contest get to vote on the other entries. for each round of voting, each entry views and votes on 5 other entries, they rank the 5 entries 1st place to 5th place where 1st is the favorite, and 5th place is the least favorite. by making each entry for on five entries, each entry media gets voted on 5 times. (this is the area i am working on now) after the voting, votes are counted, and top XX percentage moves on to the next round of voting. after 4 or 5 voting rounds (as set by the administrator) a winner is declared. the winner gets a cash prize. The part i am working on now is assigning who votes for who in the round of voting. in excel (where i planned the tables) all i had to do was set a cell to equal the 5 entries below. how would i do this in php and sql? my first move was to create a random field called EntryID, then (with help from this board) i created an incremental field called VoteID that gives a "1" to the lowest Entry ID, gives "2" to the second lowest EntryID and so on... is there an easy loop, while, or foreach that will help me assign entries something to vote on? i was thinking i can use the VoteID for this, but i am having trouble figuring out exactly what to do. i was hoping there was something easy like: $votefor1 = SELECT EntryName where $VoteID = $VoteID-1 QUERY (UPDATE table SET VoteFor1 VALUE $votefor1) i know that is not even close to proper php, it was just to demonstrate the idea. Any ideas? I would also enjoy if someone who knows a bit about php could tell me a couple key words i could use to search for a solution. Thanks!! Edit/Delete Message Link to comment https://forums.phpfreaks.com/topic/113385-solved-new-section-of-a-large-project-sqlphp/ Share on other sites More sharing options...
ryanatdrewreysolutions Posted July 5, 2008 Author Share Posted July 5, 2008 By the way, so not to be a burden on the the board, I try to answer at least one post every time i post a question, and every time someone replies to me, i answer another post! thanks again guys! Link to comment https://forums.phpfreaks.com/topic/113385-solved-new-section-of-a-large-project-sqlphp/#findComment-582566 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.