Re: [PHP] LOCKS???

[email protected] (Stuart Dallas)
Newsgroups php.general
Message-ID <CAJgGj5-iMnuDonmQv=wcFVr+-KCwOoDsqUSoMTzji9_a3JM_rw@mail.gmail.com>
On 28 November 2016 at 16:03:17, Stuart Dallas ([email protected]) wrote:

On 28 November 2016 at 15:19:12, Tedd Sperling ([email protected])
wrote:

This experiment demonstrates that LOCK TABLES does not work for me.

My question is”Why?”


The better question to ask is why are you trying to lock tables? There’s
usually a number of better ways to achieve something that can be solved
using table locking. What’s the actual operation you’re doing, or is it a
purely academic question?


Also, based on your restatement of the problem it would suggest you run the
two scripts in sequence, not in parallel. If that’s the case then the
answer is clear: when a session is terminated (i.e. you disconnect from the
database whether explicitly, or due to an error, or because the script
ends) all locks obtained by that session are released.

-Stuart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.