Highlight NULL

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@49 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2007-07-05 14:56:43 +00:00
parent 1ff257d79d
commit 9aaaa185b8

View file

@ -1,10 +1,10 @@
<?php
page_header(lang('Table') . ": " . htmlspecialchars($_GET["table"]));
$result = mysql_query("SHOW FULL COLUMNS FROM " . idf_escape($_GET["table"]));
$result = mysql_query("SHOW COLUMNS FROM " . idf_escape($_GET["table"]));
echo "<table border='1' cellspacing='0' cellpadding='2'>\n";
while ($row = mysql_fetch_assoc($result)) {
echo "<tr><th>" . htmlspecialchars($row["Field"]) . "</th><td>$row[Type]" . ($row["Null"] == "NO" ? " NOT NULL" : "") . "</td></tr>\n";
echo "<tr><th>" . htmlspecialchars($row["Field"]) . "</th><td>$row[Type]" . ($row["Null"] == "NO" ? "" : " <i>NULL</i>") . "</td></tr>\n";
}
echo "</table>\n";
mysql_free_result($result);