DatabaseField.php
public function getFieldString()
    {
        $fieldString = "`" . $this->m_name . "` " . $this->m_type;
        
        if ($this->m_constraint != null)
        {
            $fieldString .= " (" . $this->m_constraint . ")";
        }
                
        if ($this->isAutoIncrementing())
        {
            $fieldString .= " AUTO_INCREMENT";
        }
        
        if ($this->m_default !== null)
        {
            $fieldString .= " DEFAULT " . $this->m_default;
        }
        
        if (!$this->m_allowNull)
        {
            $fieldString .= " NOT NULL";
        }
        
        return $fieldString;
    }
public function getFieldString()
    {
        $fieldString = "`" . $this->m_name . "` " . $this->m_type;
        
        if ($this->m_constraint != null)
        {
            $fieldString .= " (" . $this->m_constraint . ")";
        }
                
        if ($this->isAutoIncrementing())
        {
            $fieldString .= " AUTO_INCREMENT";
        }
        
        if ($this->m_default !== null)
        {
            $fieldString .= " DEFAULT " . $this->m_default;
        }
        
        if (!$this->m_allowNull)
        {
            $fieldString .= " NOT NULL";
        }
        
        return $fieldString;
    }
public function getFieldString ( ) { $ fieldString = "`" . $ this -> m_name . "` " . $ this -> m_type ; if ( $ this -> m_constraint != null ) { $ fieldString .= " (" . $ this -> m_constraint . ")" ; } if ( $ this -> isAutoIncrementing ( ) ) { $ fieldString .= " AUTO_INCREMENT" ; } if ( $ this -> m_default !== null ) { $ fieldString .= " DEFAULT " . $ this -> m_default ; } if ( ! $ this -> m_allowNull ) { $ fieldString .= " NOT NULL" ; } return $ fieldString ; }
Returns the text representing this field's definition inside a create
table statement.
@return string - the string for defining this field in a mysql table.
Returns the text representing this field s definition inside a create table statement .