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 can 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?