]> git.joonet.de Git - adminer.git/commitdiff
Move time information
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 2 Apr 2010 15:27:37 +0000 (15:27 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 2 Apr 2010 15:27:37 +0000 (15:27 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1363 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/sql.inc.php
adminer/static/default.css

index 540a9f344833f087b48e637dde0b8c30432bd937..180b2721852e844f5395c6481f379168bd534851 100644 (file)
@@ -71,16 +71,16 @@ if (!$error && $_POST) {
                                                                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 @@ if (!$error && $_POST) {
                                                                                $_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);
index ee426dae1e2f594593167f8c29d5f6d0420499cf..567e4e6d44f8e984439a36942a65d5018af0c3c1 100644 (file)
@@ -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; }