transactions and persitent connections
| From: | Jean-Christian Imbeault | Date: | Sat, 31 Aug 2002 08:46:30 +0000 |
| Subject: | transactions and persitent connections | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21490@lists.php.net to get a copy of this message | ||
I'm a little confused/worried about database transactions, persistent connections and PHP.
I am worried that if I use persistent connections it might be possible for more than one PHP script to be inside the same transaction at the same time.
For example:
1- page1.php is a script that opens a persistent connection to a DB and starts a transaction.
2- User 1 goes to page1.php
3- User 2 goes to page1.php
My questions:
1- is it possible that user 2 will be using the same connection as user 1? So if user 1's transaction fails so will user 2's?
2- If user 1's hits the stop button on his browser, what happens to his transaction? I assume it is stopped. But what about the connection? If user 2 gets the same connection, will his transaction fail?
Thanks,
Jc