function printQueryLog() { if (!BTAuth::user()->isAdmin()) { return; } if (IS_AJAX) { printQueryLogFirePhp(); return; } echo '<table id="bt_query_log" cellpadding="0" cellspacing="0">'; echo '<tr><th colspan="2"><h2>Query Log</h2></th></tr>'; echo '<tr><th>Query</th><th>Affected Rows</th></tr>'; $log = DB::queryLog(); foreach ($log as $entry) { echo '<tr><td>' . $entry['query'] . '</td><td>' . $entry['rows'] . '</td></tr>'; } echo '</table>'; }
public static function end() { if (SHOW_QUERY_LOG) { printQueryLogFirePhp(); } exit; }