]> git.joonet.de Git - adminer.git/commitdiff
NULL in SHOW COLUMNS can be empty
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 6 Jul 2007 15:48:57 +0000 (15:48 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 6 Jul 2007 15:48:57 +0000 (15:48 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@71 7c3ca157-0c34-0410-bff1-cbf682f78f5c

functions.inc.php
table.inc.php

index b9fce47241115fdaefb7a302bf8d97c40e6c596f..764667cddbd6184593e4a363fc78eee927c53b84 100644 (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"]),
index 4f96938b435bfabbe4ad67a228c2a787da341e77..7cfac1a14fe79bba3607837a94eba76b84ea47f3 100644 (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);