mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
improve PTGen
This commit is contained in:
@@ -2594,7 +2594,7 @@ function stdfoot() {
|
||||
if ($enablesqldebug_tweak == 'yes' && get_user_class() >= $sqldebug_tweak) {
|
||||
print("<div id=\"sql_debug\">SQL query list: <ul>");
|
||||
foreach($query_name as $query) {
|
||||
print(sprintf('<li>%s [%s ms]</li>', htmlspecialchars($query['query']), $query['time'] * 1000));
|
||||
print(sprintf('<li>%s [%s]</li>', htmlspecialchars($query['query']), $query['time']));
|
||||
}
|
||||
print("</ul>");
|
||||
print("Redis key read: <ul>");
|
||||
|
||||
@@ -70,9 +70,10 @@ function sql_query($query)
|
||||
$begin = microtime(true);
|
||||
global $query_name;
|
||||
$result = mysql_query($query);
|
||||
$end = microtime(true);
|
||||
$query_name[] = [
|
||||
'query' => $query,
|
||||
'time' => microtime(true) - $begin,
|
||||
'time' => sprintf('%.3f ms', ($end - $begin) * 1000),
|
||||
];
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user