public function getSQL()
    {
        $val = $this->owner->get($this->short_name);
        if ($this->type == 'boolean') {
            $val = $this->getBooleanValue($val);
        }
        if ($val == ''
            && !$this->mandatory
            && ($this->listData || $this instanceof Field_Reference)
            && $this->type != 'boolean'
        ) {
            $val = null;
        }

        return $val;
    }
public function getSQL()
    {
        $val = $this->owner->get($this->short_name);
        if ($this->type == 'boolean') {
            $val = $this->getBooleanValue($val);
        }
        if ($val == ''
            && !$this->mandatory
            && ($this->listData || $this instanceof Field_Reference)
            && $this->type != 'boolean'
        ) {
            $val = null;
        }

        return $val;
    }
public function getSQL ( ) { $ val = $ this -> owner -> get ( $ this -> short_name ) ; if ( $ this -> type == 'boolean' ) { $ val = $ this -> getBooleanValue ( $ val ) ; } if ( $ val == '' && ! $ this -> mandatory && ( $ this -> listData || $ this instanceof Field_Reference ) && $ this -> type != 'boolean' ) { $ val = null ; } return $ val ; }
Get value of this field formatted for SQL. Redefine if you need to convert.

@return mixed
Get value of this field formatted for SQL . Redefine if you need to convert .