Skip to content

Commit

Permalink
Display length in full type
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed May 12, 2010
1 parent 9f10f22 commit de08000
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions adminer/drivers/mssql.inc.php
Expand Up @@ -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"],
Expand Down

0 comments on commit de08000

Please sign in to comment.