small fixes in output

This commit is contained in:
Steve Alberty
2001-06-10 12:54:32 +00:00
parent 7ba84db28c
commit d1b7dd79a3

View File

@@ -64,13 +64,18 @@ while($row= mysql_fetch_array($result))
$Type = stripslashes($row["Type"]); $Type = stripslashes($row["Type"]);
} else { } else {
$Type = $row["Type"]; $Type = $row["Type"];
}
// reformat mysql query output - staybyte - 9. June 2001
$shorttype=substr($Type,0,3);
if ($shorttype=="set" || $shorttype=="enu"){
$Type=eregi_replace (",",", ",$Type);
} }
$Type = eregi_replace("BINARY", "", $Type); $Type = eregi_replace("BINARY", "", $Type);
$Type = eregi_replace("ZEROFILL", "", $Type); $Type = eregi_replace("ZEROFILL", "", $Type);
$Type = eregi_replace("UNSIGNED", "", $Type); $Type = eregi_replace("UNSIGNED", "", $Type);
echo $Type; if (!empty($Type)) echo $Type;
?>&nbsp;</td> else echo "&nbsp;";
<td> ?></td><td>
<?php <?php
$binary = eregi("BINARY", $row["Type"], $test); $binary = eregi("BINARY", $row["Type"], $test);
$unsigned = eregi("UNSIGNED", $row["Type"], $test); $unsigned = eregi("UNSIGNED", $row["Type"], $test);
@@ -82,10 +87,10 @@ while($row= mysql_fetch_array($result))
$strAttribute="UNSIGNED"; $strAttribute="UNSIGNED";
if ($zerofill) if ($zerofill)
$strAttribute="UNSIGNED ZEROFILL"; $strAttribute="UNSIGNED ZEROFILL";
echo $strAttribute; if (!empty($strAttribute)) echo $strAttribute;
else echo "&nbsp;";
$strAttribute=""; $strAttribute="";
?> ?></td>
&nbsp;</td>
<td><?php if ($row["Null"] == "") { echo $strNo;} else {echo $strYes;}?>&nbsp;</td> <td><?php if ($row["Null"] == "") { echo $strNo;} else {echo $strYes;}?>&nbsp;</td>
<td><?php if(isset($row["Default"])) echo $row["Default"];?>&nbsp;</td> <td><?php if(isset($row["Default"])) echo $row["Default"];?>&nbsp;</td>
<td><?php echo $row["Extra"];?>&nbsp;</td> <td><?php echo $row["Extra"];?>&nbsp;</td>