Hi all!

I have a question as to the optimal method of counting and storing votes in
an online poll.

Once a user answers the poll by clicking on one of three options, I am
performing a query on a table which holds values for each option. Currently I
- query the table to get the current count
- increment the count by 1
- UPDATE the table with the new value

I wonder: what happens if two users submit the answer simulatneously, and
the answer is the same. Will only of those votes register? Or will the SQL
somehow be "queued" so that both are counted?

If the former - is there any other, better way to do this?

I am using mySQL as the database, and PHP to process the form and execute
the query.

Please CC your response to the address above also.

TIA

Vikram Vaswani


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to