Permalink
Browse files

Display length in full type

  • Loading branch information...
1 parent 9f10f22 commit de08000b0b5e5a1b6f9dee532541542c991d433f @vrana committed May 11, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 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"],

0 comments on commit de08000

Please sign in to comment.