Hi there, I have a problem with a script I am writing.
I have browsed online for the answer, but I can't find anything
Here is what I am trying to do:
I have a form where users sign up for a music contest - the fields for the form are EntryName, EntryMediaName, and LinkToMedia
once a few dozen people sign up, I close the contest for new entries.
That part was simple.
Next I want to UPDATE the database to include a EntryID field - this is a random number given to each entry.
No Problem on this part either.
Next (here is where I am stuck)
SQL sorts the table by the random EntryID - then I want to update the table with a new field - VoteID. I want this to be an incremental integer where the lowest EntryID gets a "1" in VoteID - the next lowest EntryID gets a "2" in VoteID.
Now I could use a number of suggestions: 1) how to do the above 2) a different way to do this 3) a forum or a place in a manual to look up the answer
The reason I want to do this is, I want to use the VoteID to assign each contestant a video to judge. each entry submits a video to be voted on by other contestants (not my idea, i am just coding)
I already have a field ID that is auto-incremental, I don't want to use this field instead of VoteID. I want VoteID to be assigned AFTER all of the contestants have registered and submitted their media.
Any suggestions would be helpful!
|