]> git.joonet.de Git - adminer.git/commitdiff
Describe comments
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 20 Aug 2009 14:04:24 +0000 (14:04 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 20 Aug 2009 14:04:24 +0000 (14:04 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@984 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/table.inc.php

index 65d37c55d65cb10c2ac5074ea6057e09e2544dc4..47c5cffa806b8ed072df3f52988c719dcb698736 100644 (file)
@@ -10,22 +10,15 @@ page_header(($result && $is_view ? lang('View') : lang('Table')) . ": " . h($_GE
 
 if ($result) {
        $auto_increment_only = true;
-       $comments = false;
-       $rows = array();
+       echo "<table cellspacing='0'>\n";
+       echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . "<td>" . lang('Comment') . "</thead>\n";
        while ($row = $result->fetch_assoc()) {
                if (!$row["auto_increment"]) {
                        $auto_increment_only = false;
                }
-               if (strlen(trim($row["Comment"]))) {
-                       $comments = true;
-               }
-               $rows[] = $row;
-       }
-       echo "<table cellspacing='0'>\n";
-       foreach ($rows as $row) {
                echo "<tr><th>" . h($row["Field"]);
                echo "<td>" . h($row["Type"]) . ($row["Null"] == "YES" ? " <i>NULL</i>" : "");
-               echo ($comments ? "<td>" . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : "&nbsp;") : "");
+               echo "<td>" . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : "&nbsp;");
                echo "\n";
        }
        echo "</table>\n";