diff --git a/library/ZFDebug/Controller/Plugin/Debug/Plugin/Database.php b/library/ZFDebug/Controller/Plugin/Debug/Plugin/Database.php index 5ad1e86..8b8bf01 100644 --- a/library/ZFDebug/Controller/Plugin/Debug/Plugin/Database.php +++ b/library/ZFDebug/Controller/Plugin/Debug/Plugin/Database.php @@ -101,6 +101,7 @@ public function getTab() if (!$this->_db) return 'No adapter'; + $adapterInfo = array(); foreach ($this->_db as $adapter) { $profiler = $adapter->getProfiler(); $adapterInfo[] = $profiler->getTotalNumQueries() . ' in ' @@ -141,7 +142,7 @@ public function getProfile() if ($profiles = $adapter->getProfiler()->getQueryProfiles()) { $adapter->getProfiler()->setEnabled(false); if (1 < count($this->_db)) { - $html .= '
\n" + . sprintf('%0.2f', round($query['executionMS']*1000, 2)) + . "ms | \n"; + $params = array(); + if(!empty($query['params'])) { + $params = $query['params']; + array_walk($params, array($this, '_addQuotes')); + } + $paramCount = count($params); + if ($paramCount) { + $queries .= htmlspecialchars(preg_replace(array_fill(0, $paramCount, '/\?/'), $params, $query['sql'], 1)); + } else { + $queries .= htmlspecialchars($query['sql']); + } + $queries .= " | \n