Add query log debugging via a constant flag
This commit is contained in:
parent
67045c8c8d
commit
93638f65d4
|
@ -2,9 +2,10 @@
|
|||
|
||||
require_once __DIR__ . '/database.php';
|
||||
|
||||
define('VERSION', '1.2.3');
|
||||
define('VERSION', '1.2.5');
|
||||
define('BUILD', 'Reawaken');
|
||||
define('START', microtime(true));
|
||||
define('DEBUG', true);
|
||||
|
||||
/**
|
||||
* Open or get SQLite database connection.
|
||||
|
@ -211,7 +212,8 @@ function display($content, $title, $topnav=true, $leftnav=true, $rightnav=true,
|
|||
"totaltime" => round(getmicrotime() - START, 4),
|
||||
"numqueries" => db()->count,
|
||||
"version" => VERSION,
|
||||
"build" => BUILD
|
||||
"build" => BUILD,
|
||||
"querylog" => DEBUG ? '<pre>'.print_r(db()->log, true).'</pre>' : ''
|
||||
]);
|
||||
|
||||
echo "<html>\n" . $page;
|
||||
|
|
|
@ -38,6 +38,8 @@ $template = <<<HTML
|
|||
<div>{{totaltime}} Seconds, {{numqueries}} Queries</div>
|
||||
<div>Version {{version}} {{build}}</div>
|
||||
</footer>
|
||||
|
||||
{{querylog}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue
Block a user