Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move time information

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1363 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
commit d6972bde5bdeff7d8a497851679d8115c4268d81 1 parent a0dd59e
jakubvrana authored
Showing with 7 additions and 6 deletions.
  1. +6 −5 adminer/sql.inc.php
  2. +1 −1  adminer/static/default.css
View
11 adminer/sql.inc.php
@@ -71,16 +71,16 @@
break;
}
} else {
- $end = explode(" ", microtime());
- echo "<p class='time'>" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . "</p>\n";
do {
$result = $connection->store_result();
+ $end = explode(" ", microtime());
+ $time = " <span class='time'>(" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . ")</span>";
if (is_object($result)) {
select($result, $connection2);
+ echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q)) {
$id = "explain-$queries";
- echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) . ", " : "");
- echo "<a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>\n";
+ echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>\n";
echo "<div id='$id' class='hidden'>\n";
select($connection2->query("EXPLAIN $q"));
echo "</div>\n";
@@ -91,9 +91,10 @@
$_SESSION["databases"][$_GET["server"]] = null; // clear cache
session_write_close();
}
- echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "\n";
+ echo "<p class='message' title='" . h($connection->info) . "'>" . 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);
View
2  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; }
Please sign in to comment.
Something went wrong with that request. Please try again.