Basically, I'm creating a voting system....

Questions are basically :-

time, Question(text), a randomised number

(eg the 10 digit UNIX time stamp the question was created...)

Answers are referenced in the same way (same time-stamp as the question...)

I havnt started yet :- But I'm thinking ofd creating an answers table as :-

Question number,  randomised number, email, time

Where the question is the question number (obviously)..
- The random number is the same as one of the answers..
- the persons emaIl address
- then - the UNIX time tamp that the answer was received....

MY QUESTION :-

1)

Is there a way, to compare the Question number, then the persons email address..

If there are duplicates - Then compare the 4th column (the time thge
answer was recorded) - and then delete the older values/records....)

OR

is there a single command to MODIFY a field (& if it doesnt exist) -
to INSERT at the same time...

EG Modify answer=(randomised number). time=updatedtime where Email =
'$email' AND Question='$number'

(but also INSERT at the same time - if it doesnt exist ? )

I'm off to bed - 1:15 a.m. - but be back tomorow...


-- 

G Stewart
NZ community groups - [EMAIL PROTECTED]


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to