From d6972bde5bdeff7d8a497851679d8115c4268d81 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Fri, 2 Apr 2010 15:27:37 +0000 Subject: [PATCH] Move time information git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1363 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/sql.inc.php | 11 ++++++----- adminer/static/default.css | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 540a9f34..180b2721 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -71,16 +71,16 @@ 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 = $connection->store_result(); + $end = explode(" ", microtime()); + $time = " (" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . ")"; if (is_object($result)) { select($result, $connection2); + echo "

" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time; if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q)) { $id = "explain-$queries"; - echo "

" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) . ", " : ""); - echo "EXPLAIN\n"; + echo ", EXPLAIN\n"; echo "

\n"; @@ -91,9 +91,10 @@ if (!$error && $_POST) { $_SESSION["databases"][$_GET["server"]] = null; // clear cache session_write_close(); } - echo "

" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "\n"; + echo "

" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n"; } unset($result); // free resultset + $start = $end; } while ($connection->next_result()); } $query = substr($query, $offset); diff --git a/adminer/static/default.css b/adminer/static/default.css index ee426dae..567e4e6d 100644 --- a/adminer/static/default.css +++ b/adminer/static/default.css @@ -29,7 +29,7 @@ tr:hover td, tr:hover th { background: #ddf; } .enum { color: #007F7F; } .binary { color: red; } .odd td { background: #F5F5F5; } -.time { color: silver; font-size: 70%; float: right; margin-top: -3em; } +.time { color: silver; font-size: 70%; } .function { text-align: right; } .number { text-align: right; } .datetime { text-align: right; }