function db_field_names

Same name in other branches
  1. 8.9.x core/includes/database.inc \db_field_names()

Returns an array of field names from an array of key/index column specifiers.

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.

Related topics

File

includes/database/database.inc, line 2852

Code

function db_field_names($fields) {
    return Database::getConnection()->schema()
        ->fieldNames($fields);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.