diff --git a/changes.txt b/changes.txt index 15f0e5d8..fda75043 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,6 @@ phpMinAdmin 1.10.2: Connection through socket by server :/path/to/socket +Display execution time in SQL query phpMinAdmin 1.10.1: Highlight odd and hover rows diff --git a/default.css b/default.css index b33fd666..de119045 100644 --- a/default.css +++ b/default.css @@ -22,6 +22,7 @@ code { background: #eee; } .enum { color: #007F7F; } .binary { color: red; } .odd td { background: #F5F5F5; } +.time { color: Silver; font-size: 70%; float: right; margin-top: -3em; } tr:hover td { background: #ddf; } thead tr:hover td { background: transparent; } #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; overflow: auto; overflow-y: hidden; white-space: nowrap; } diff --git a/lang/cs.inc.php b/lang/cs.inc.php index c0b924bf..9b5b3d7b 100644 --- a/lang/cs.inc.php +++ b/lang/cs.inc.php @@ -216,4 +216,5 @@ $translations = array( 'Stop on error' => 'Zastavit při chybě', 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s a %s.', '(anywhere)' => '(kdekoliv)', + '%.3f s' => '%.3f s', ); diff --git a/sql.inc.php b/sql.inc.php index be8b7168..e0164484 100644 --- a/sql.inc.php +++ b/sql.inc.php @@ -26,6 +26,7 @@ if (!$error && $_POST) { $empty = false; echo "
" . htmlspecialchars(substr($query, 0, $match[0][1])) . "
\n"; flush(); + $start = explode(" ", microtime()); //! don't allow changing of character_set_results, convert encoding of displayed query if (!$dbh->multi_query(substr($query, 0, $match[0][1]))) { echo "

" . lang('Error in query') . ": " . htmlspecialchars($dbh->error) . "

\n"; @@ -33,6 +34,8 @@ if (!$error && $_POST) { break; } } else { + $end = explode(" ", microtime()); + echo "

" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . "

\n"; do { $result = $dbh->store_result(); if (is_object($result)) {