public function columnTypeString($Column)
{
if (is_string($Column)) {
$Column = $this->_Columns[$Column];
}
$Type = val('Type', $Column);
$Length = val('Length', $Column);
$Precision = val('Precision', $Column);
if (in_array(strtolower($Type), array('tinyint', 'smallint', 'mediumint', 'int', 'float', 'double'))) {
$Length = null;
}
if ($Type && $Length && $Precision) {
$Result = "{$Type}({$Length}, {$Precision})";
} elseif ($Type && $Length) {
$Result = "{$Type}({$Length})";
} elseif (strtolower($Type) == 'enum') {
$Result = val('Enum', $Column, array());
} elseif ($Type) {
$Result = $Type;
} else {
$Result = 'int';
}
return $Result;
}