public function getColumnType($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            $type = explode('(', $column['Type'], 2);
            return $type[0];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
public function getColumnType($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            $type = explode('(', $column['Type'], 2);
            return $type[0];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
public function getColumnType ( $ tableName , $ columnName ) { $ columns = $ this -> getTableColumns ( $ tableName ) ; foreach ( $ columns as $ column ) { if ( $ column [ 'Field' ] != $ columnName ) continue ; $ type = explode ( '(' , $ column [ 'Type' ] , 2 ) ; return $ type [ 0 ] ; } throw new \ Exception ( "Column `$columnName` not found in table `$tableName`!" ) ; }
Returns column type.
@param string $tableName
@param string $columnName
@return string
@throws \Exception if column is not found
Returns column type .