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"]);
} else {
$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("ZEROFILL", "", $Type);
$Type = eregi_replace("UNSIGNED", "", $Type);
echo $Type;
?>&nbsp;</td>
<td>
if (!empty($Type)) echo $Type;
else echo "&nbsp;";
?></td><td>
<?php
$binary = eregi("BINARY", $row["Type"], $test);
$unsigned = eregi("UNSIGNED", $row["Type"], $test);
@@ -82,10 +87,10 @@ while($row= mysql_fetch_array($result))
$strAttribute="UNSIGNED";
if ($zerofill)
$strAttribute="UNSIGNED ZEROFILL";
echo $strAttribute;
if (!empty($strAttribute)) echo $strAttribute;
else echo "&nbsp;";
$strAttribute="";
?>
&nbsp;</td>
?></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 echo $row["Extra"];?>&nbsp;</td>