/**
 * Get columns with indexes
 *
 * @param string $db    database name
 * @param string $table tablename
 * @param int    $types types bitmask
 *
 * @return array an array of columns
 */
function PMA_getColumnsWithIndex($db, $table, $types)
{
    $columns_with_index = array();
    foreach (PMA_Index::getFromTableByChoice($table, $db, $types) as $index) {
        $columns = $index->getColumns();
        foreach ($columns as $column_name => $dummy) {
            $columns_with_index[$column_name] = 1;
        }
    }
    return array_keys($columns_with_index);
}
 /**
  * Get columns with indexes
  *
  * @param int $types types bitmask
  *
  * @return array an array of columns
  */
 function getColumnsWithIndex($types)
 {
     $columns_with_index = array();
     foreach (PMA_Index::getFromTableByChoice($this->_name, $this->_db_name, $types) as $index) {
         $columns = $index->getColumns();
         foreach ($columns as $column_name => $dummy) {
             $columns_with_index[] = $column_name;
         }
     }
     return $columns_with_index;
 }