From de08000b0b5e5a1b6f9dee532541542c991d433f Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Tue, 11 May 2010 23:17:11 +0200 Subject: [PATCH] Display length in full type --- adminer/drivers/mssql.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adminer/drivers/mssql.inc.php b/adminer/drivers/mssql.inc.php index f7f1f4465..399437e56 100644 --- a/adminer/drivers/mssql.inc.php +++ b/adminer/drivers/mssql.inc.php @@ -320,11 +320,12 @@ function fields($table) { WHERE o.schema_id = SCHEMA_ID(" . $connection->quote(get_schema()) . ") AND o.type IN ('S', 'U', 'V') AND o.name = " . $connection->quote($table) ); while ($row = $result->fetch_assoc()) { + $length = $row["max_length"]; //! precision, scale $return[$row["name"]] = array( "field" => $row["name"], - "full_type" => $row["type"], + "full_type" => $row["type"] . ($length ? "($length)" : ""), "type" => $row["type"], - "length" => $row["max_length"], //! precision, scale + "length" => $length, "default" => $row["default"], "null" => $row["is_nullable"], "auto_increment" => $row["is_identity"],