You are here

function db_field_names in Schema 5

Return an array of field names from an array of key/index column specifiers. Copied from D6.

This is usually an identity function but if a key/index uses a column prefix specification, this function extracts just the name.

Parameters

$fields: An array of key/index column specifiers.

Return value

An array of field names.

1 call to db_field_names()
schema_compare_schemas in ./schema.module

File

./schema_util.inc, line 77

Code

function db_field_names($fields) {
  $ret = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $ret[] = $field[0];
    }
    else {
      $ret[] = $field;
    }
  }
  return $ret;
}