public function getColumnDefaultValue($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            return $column['Default'];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
public function getColumnDefaultValue($tableName, $columnName) {
        $columns = $this->getTableColumns($tableName);
        foreach ($columns as $column) {
            if ($column['Field'] != $columnName)
                continue;
            return $column['Default'];
        }
        throw new \Exception("Column `$columnName` not found in table `$tableName`!");
    }
public function getColumnDefaultValue ( $ tableName , $ columnName ) { $ columns = $ this -> getTableColumns ( $ tableName ) ; foreach ( $ columns as $ column ) { if ( $ column [ 'Field' ] != $ columnName ) continue ; return $ column [ 'Default' ] ; } throw new \ Exception ( "Column `$columnName` not found in table `$tableName`!" ) ; }
Returns default value for selected column or NULL if there is no default;
@param string $tableName
@param string $columnName
@return string|int|null
@throws \Exception if column is not found
Returns default value for selected column or NULL if there is no default ;