How MySQL manage multiple queries from multiple users simultaneously?

tujaviee

New Member
Just to give you an example:I have a PHP script that manages users votes.When a user votes, the script makes a query to check if someone has already voted for the same ID/product. If nobody has voted, then it makes another query and insert the ID into a general ID votes table and another one to insert the data into a per user ID votes table. And this kind of behavior is repeated in other kind of scripts.The question is, if two different users votes simultaneously its possible that the two instances of the code try to insert a new ID (or some similar type of query) that will give an error??If yes, how I prevent this from happening?Thanks?Important note: I'm using MyISAM! My web hosting don't allow InnoDB.
 
Back
Top