[英]How to find MySQl query type before query execution Zend framework
I am using Zend Framework with MySQL DB as backend. 我正在使用Zend Framework和MySQL DB作为后端。
I want to perform some operations depending on the type of query executed on MySQL server. 我想根据MySQL服务器上执行的查询类型执行一些操作。
I want to perform these operations before query execution. 我想在查询执行之前执行这些操作。
So my question is can I find the type of query before it is executed using Zend Framework eg SELECT , UPDATE, INSERT or DELETE ? 所以我的问题是我可以在使用Zend Framework执行查询之前找到查询的类型,例如SELECT,UPDATE,INSERT或DELETE吗?
Many thanks in advance. 提前谢谢了。
I think you should look at the code of this class - Zend_Db_Table_Abstract. 我认为您应该查看此类的代码-Zend_Db_Table_Abstract。
Location - Zend/Db/Table/Abstract.php 位置-Zend / Db / Table / Abstract.php
Whenever I am into doubts about how Zend Framework is executing something, I dig inside the framework and check the code executing in the underlying classes. 每当我对Zend Framework如何执行某些事情感到怀疑时,我都会在框架中进行挖掘并检查在底层类中执行的代码。
Its clears up every question I have in my mind. 它清除了我心中的每个问题。
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.