Re: transactions and persitent connections
| From: | Jean-Christian Imbeault | Date: | Sun, 01 Sep 2002 13:51:59 +0000 |
| Subject: | Re: transactions and persitent connections | ||
| References: | 1 2 3 4 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21505@lists.php.net to get a copy of this message | ||
Paul Dubois wrote:
Thanks for clearing that up for me.Does the script go from start to finish even though the connection to the browser has been severed. I.e. The script will run complete even if there is output to the browser as the script is running?Not necessarily. It won't base its actions on what the browser might happen to be doing while it's running, but it might exit early because of a bug, for example. But normally it will run to completion.
You should write your script so that is *does* go from start to finish. Forget about what the user might be doing.Trying *very* hard.
No. Don't use persistent connections. If some unforeseen problem does occur with your script, the connection may be left open and you'll have the problems you're concerned about. If you use a non-persistent connection and a problem occurs, the connection will be closed (which presumably will make your transaction roll back).Thanks. With what you've explained I understand the pitfalls persistent connections might and will not be using them. Such a shame ... Thanks again for all the information! Jc