vardef_map['precision']='ext1'; //$this->vardef_map['precision']='precision'; } function get_field_def(){ $def = parent::get_field_def(); $def['precision'] = isset($this->ext1) && $this->ext1 != '' ? $this->ext1 : $this->precision; return $def; } function get_db_type(){ $precision = (!empty($this->precision))? $this->precision: 6; if(empty($this->len)) { return parent::get_db_type(); } return " ".sprintf($GLOBALS['db']->getColumnType("decimal_tpl"), $this->len, $precision); } }