_queriesLog, 'took', 'desc', SORT_NUMERIC); } else { $log = $this->_queriesLog; } if ($this->_queriesCnt > 1) { $text = 'queries'; } else { $text = 'query'; } if (php_sapi_name() != 'cli') { $summery = "{$this->_queriesCnt} {$text} took {$this->_queriesTime} ms"; $header = array("Nr", "Query", "Error", "Affected", "Num. rows", "Took (ms)"); $body = array($header); foreach ($log as $k => $i) { $row = array(($k + 1), $i['query'], $i['error'], $i['affected'], $i['numRows'], $i['took']); $body[] = $row; } fb(array($summery, $body), FirePHP::TABLE); } else { foreach ($log as $k => $i) { print (($k + 1) . ". {$i['query']} {$i['error']}\n"); } } } ?>