开发者

Stack trace for sql query execution? (Zend Framework)

Is there a way to get the stack trace for each sql query using the db profiler?

I'm using the profiler like so:

foreach($profiler->getQueryProfiles() as $query) {

}

Which is fine as I ca开发者_运维技巧n get elapsed seconds, actual query etc but I want to know where this query was called from so I need the last 3 or 4 items in the stack trace.

Any ideas?


Extend Zend_Db_Profiler and use debug_backtrace() in the queryEnd method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜