keyName = $aKeyName; $this->columnName = $aColumnName; $this->isPrimary = $isPrimary; } function getKey() { return $this->keyName . "," . $this->columnName . "," . $this->isPrimary; } function isPrimary() { return $this->isPrimary; } function getColumnName() { return $this->columnName; } function getKeyName() { return $this->keyName; } function getMysql() { $sql = ""; if ($this->isPrimary()) { $sql .= " PRIMARY"; } $sql .= " KEY"; if ($this->getKeyName()) { $sql .= " " . $this->getKeyName(); } $sql .= " (" . $this->getColumnName() . ")"; $sql .= "\n\n"; return $sql; } function destroyKey () { settype(&$this, 'null'); } } ?>