public function columnExists(string $tableName, string $columnName)
    {
        if ($this->tableExists($tableName)) {
            $names = array_flip($this->getColumnNames($tableName));

            return array_key_exists($columnName, $names);
        }

        return false;
    }
public function columnExists(string $tableName, string $columnName)
    {
        if ($this->tableExists($tableName)) {
            $names = array_flip($this->getColumnNames($tableName));

            return array_key_exists($columnName, $names);
        }

        return false;
    }
public function columnExists ( string $ tableName , string $ columnName ) { if ( $ this -> tableExists ( $ tableName ) ) { $ names = array_flip ( $ this -> getColumnNames ( $ tableName ) ) ; return array_key_exists ( $ columnName , $ names ) ; } return false ; }
Find out if a table in the database contains a column.

@param string $tableName Table name
@param string $columnName Column name
@return boolean True if the column exists, false otherwise
Find out if a table in the database contains a column .