diff --git a/adminer/table.inc.php b/adminer/table.inc.php index 4e9d803a..65d37c55 100644 --- a/adminer/table.inc.php +++ b/adminer/table.inc.php @@ -1,5 +1,5 @@ query("SHOW COLUMNS FROM " . idf_escape($_GET["table"])); +$result = $dbh->query("SHOW FULL COLUMNS FROM " . idf_escape($_GET["table"])); if (!$result) { $error = h($dbh->error); } @@ -10,12 +10,23 @@ page_header(($result && $is_view ? lang('View') : lang('Table')) . ": " . h($_GE if ($result) { $auto_increment_only = true; - echo "\n"; + $comments = false; + $rows = array(); while ($row = $result->fetch_assoc()) { if (!$row["auto_increment"]) { $auto_increment_only = false; } - echo "
" . h($row["Field"]) . "" . h($row["Type"]) . ($row["Null"] == "YES" ? " NULL" : "") . "\n"; + if (strlen(trim($row["Comment"]))) { + $comments = true; + } + $rows[] = $row; + } + echo "\n"; + foreach ($rows as $row) { + echo "
" . h($row["Field"]); + echo "" . h($row["Type"]) . ($row["Null"] == "YES" ? " NULL" : ""); + echo ($comments ? "" . (strlen(trim($row["Comment"])) ? h($row["Comment"]) : " ") : ""); + echo "\n"; } echo "
\n"; $result->free();