Does there is way to set isolation level independently to concrete database driver in php?
Looks like there is no.
Does there is way to set isolation level independently to concrete database driver in
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately, I’m not sure there is a way to do such a thing with Zend_Db. The manual says that
setTransactionIsolationLevel()can be used only with the Microsoft SQL Server adapter.It doesn’t seem that the Zend_Db API implements a way to manage transaction isolation levels, the only way would be to write your own SQL statements and execute them according the the PDO driver you are using.
I would recommend you instead to use a better database abstraction layer such as Doctrine (really powerful). Then you would be able to do it this way:
See this question to know how to integrate Doctrine with ZF and this page for more information about transaction management using Doctrine.