/** * Returns a reference to the key fields of this table. If the table has */ function &keys() { if (isset($this->table)) { $keys =& $this->table->keys(); } else { $keys = array(); foreach (array_keys($this->fields) as $key) { if (strtolower($this->fields[$key]['Key']) == 'pri') { $keys[$key] =& $this->fields[$key]; } } } return $keys; }