1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

NULL in SHOW COLUMNS can be empty

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@71 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2007-07-06 15:48:57 +00:00
parent 57bd3d8562
commit e9ca7eb7a6
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ function fields($table) {
"length" => $match[2],
"unsigned" => ltrim($match[3] . $match[4]),
"default" => $row["Default"],
"null" => ($row["Null"] != "NO"),
"null" => ($row["Null"] == "YES"),
"extra" => $row["Extra"],
"collation" => $row["Collation"],
"privileges" => explode(",", $row["Privileges"]),

View File

@@ -7,7 +7,7 @@ if (!$result) {
} else {
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" ? "" : " <i>NULL</i>") . "</td></tr>\n";
echo "<tr><th>" . htmlspecialchars($row["Field"]) . "</th><td>$row[Type]" . ($row["Null"] == "YES" ? " <i>NULL</i>" : "") . "</td></tr>\n";
}
echo "</table>\n";
mysql_free_result($result);