]> git.mjollnir.org Git - moodle.git/commitdiff
Max for decimal type in MSSQL is 38 cc.
authorstronk7 <stronk7>
Sat, 26 Aug 2006 00:50:09 +0000 (00:50 +0000)
committerstronk7 <stronk7>
Sat, 26 Aug 2006 00:50:09 +0000 (00:50 +0000)
lib/xmldb/classes/generators/mssql/mssql.class.php

index 38e690fffbebd09a5b3a4c1c6db4e28929ac6c8d..c731dd3f7bdf13a6b83c7b790be63475c2cf6a9a 100644 (file)
@@ -83,6 +83,10 @@ class XMLDBmssql extends XMLDBgenerator {
             case XMLDB_TYPE_NUMBER:
                 $dbtype = $this->number_type;
                 if (!empty($xmldb_length)) {
+                /// 38 is the max allowed
+                    if ($xmldb_length > 38) {
+                        $xmldb_length = 38;
+                    }
                     $dbtype .= '(' . $xmldb_length;
                     if (!empty($xmldb_decimals)) {
                         $dbtype .= ',' . $xmldb_decimals;