Is it ok to run whole PHP application in a MySQL transaction?
问题 Is it ok to run whole PHP application in a MySQL transaction? Is there any side effects? I mean something like this: Client requests A.php A.php -> start mysql transaction A.php -> execute and process request A.php -> commit mysql transaction send requested data to client 回答1: I would not call this running the whole PHP application in one transaction , but rather a PHP script that treats each request in a separate transaction. That is fine, as long as you are aware of transaction related