public function getEnumValues($tableName, $columnName) {

		// check whether column exists

		if(!$this->columnExists($tableName, $columnName)) {
			throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName));
		}
		
		// wrong data type
		
		$dataType = $this->tableStructureCache[$tableName][$columnName]['dataType']; 
		
		if(!($dataType === 'enum' || $dataType === 'set')) {
			throw new \PDOException(sprintf("Column '%s' in table '%s' is not of type ENUM or SET.", $columnName, $tableName));
		}
		
		// extract enum values the first time

		if(!isset($this->tableStructureCache[$tableName][$columnName]['enumValues'])) {
			preg_match_all(
				"~'(.*?)'~i",
				$this->tableStructureCache[$tableName][$columnName]['columnType'],
				$matches
			);
			
			$this->tableStructureCache[$tableName][$columnName]['enumValues'] = $matches[1];
		}
		
		return $this->tableStructureCache[$tableName][$columnName]['enumValues'];
		
	}
public function getEnumValues($tableName, $columnName) {

		// check whether column exists

		if(!$this->columnExists($tableName, $columnName)) {
			throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName));
		}
		
		// wrong data type
		
		$dataType = $this->tableStructureCache[$tableName][$columnName]['dataType']; 
		
		if(!($dataType === 'enum' || $dataType === 'set')) {
			throw new \PDOException(sprintf("Column '%s' in table '%s' is not of type ENUM or SET.", $columnName, $tableName));
		}
		
		// extract enum values the first time

		if(!isset($this->tableStructureCache[$tableName][$columnName]['enumValues'])) {
			preg_match_all(
				"~'(.*?)'~i",
				$this->tableStructureCache[$tableName][$columnName]['columnType'],
				$matches
			);
			
			$this->tableStructureCache[$tableName][$columnName]['enumValues'] = $matches[1];
		}
		
		return $this->tableStructureCache[$tableName][$columnName]['enumValues'];
		
	}
public function getEnumValues ( $ tableName , $ columnName ) { // check whether column exists if ( ! $ this -> columnExists ( $ tableName , $ columnName ) ) { throw new \ PDOException ( sprintf ( "Unknown column '%s' in table '%s'." , $ columnName , $ tableName ) ) ; } // wrong data type $ dataType = $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'dataType' ] ; if ( ! ( $ dataType === 'enum' || $ dataType === 'set' ) ) { throw new \ PDOException ( sprintf ( "Column '%s' in table '%s' is not of type ENUM or SET." , $ columnName , $ tableName ) ) ; } // extract enum values the first time if ( ! isset ( $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'enumValues' ] ) ) { preg_match_all ( "~'(.*?)'~i" , $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'columnType' ] , $ matches ) ; $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'enumValues' ] = $ matches [ 1 ] ; } return $ this -> tableStructureCache [ $ tableName ] [ $ columnName ] [ 'enumValues' ] ; }
return all possible options of an enum or set attribute

@param string $tableName
@param string $columnName
@return array

@throws \PDOException
return all possible options of an enum or set attribute