Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Send this topic | Print
Topic: PHP MYSQL problem  (Read 259 times)
« on: July 02, 2008, 09:27:44 PM »
ryanatdrewreysolutions Offline
Newbie

View Profile
*
Posts: 4



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!
Report to moderator   Logged

 
 
Pages: [1]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC