1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

Allow char(0)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1168 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-10-06 10:00:23 +00:00
parent fb141ccf3a
commit 5c862bac67

View File

@@ -114,7 +114,7 @@ function process_length($length) {
function process_type($field, $collate = "COLLATE") {
global $connection, $enum_length, $unsigned;
return " $field[type]"
. ($field["length"] && !ereg('^date|time$', $field["type"]) ? "(" . process_length($field["length"]) . ")" : "")
. (strlen($field["length"]) && !ereg('^date|time$', $field["type"]) ? "(" . process_length($field["length"]) . ")" : "")
. (ereg('int|float|double|decimal', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
. (ereg('char|text|enum|set', $field["type"]) && $field["collation"] ? " $collate " . $connection->quote($field["collation"]) : "")
;