Gdn_DatabaseStructure::columnExists PHP Method

columnExists() public method

Returns whether or not a column exists in the database.
public columnExists ( string $ColumnName ) : boolean
$ColumnName string The name of the column to check.
return boolean
    public function columnExists($ColumnName)
    {
        $Result = array_key_exists($ColumnName, $this->existingColumns());
        if (!$Result) {
            foreach ($this->existingColumns() as $ColName => $Def) {
                if (strcasecmp($ColumnName, $ColName) == 0) {
                    return true;
                }
            }
            return false;
        }
        return $Result;
    }