I am having a PHP script, which starts another php script multiple times in an foreach loop. The other php scripts writes data to the same database table.
Will this cause any problems, because there will be around 30 processes writing to the same database table…
Or is this automatically handeled by MySQL ?
Thanks you!
Bye,
WorldSignia
It depends on what you are writing.
INSERTcan be used simultaneously.UPDATE ... WHERE ...might lead to conflicts.Imagine you are executing
UPDATE ... WHERE id=2from two scripts at once. One might overwrite the other. You need to implement some locking facility.