Reputation: 1522
I just finished programming a plattform on PHP that uses MySQL to save the results of a poll. I will be doing the poll with a group of 24 users that will submit the form at more or less the same time. So that the mysqli_query()
function will be executed around 24 times at the same time.
Is this a problem?
Should I worry about the function blocking the access to the db, or is the mysqli_query()
safe to use without having to worry about blocking?
Upvotes: 0
Views: 59
Reputation: 4343
In general no, unless you are doing something very interesting in the application logic that requires the data from another row. For example if you are using an ID it should be of the auto increamenting type, pretty standard stuff. You know you are ok if you are are only doing an insert and no select before hand and don't have a crazy stored proc on the database, which you likely do not.
Upvotes: 2
Reputation: 8575
mysql_queries will executed by order in which they arrived to mysql server. You can don't worry about it
Upvotes: 2