db_field_names($fields)
drupal/includes/database/database.inc, line 1908
Return 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.
$fields An array of key/index column specifiers.
An array of field names.
| Name | Description |
|---|---|
| Schema API | A Drupal schema definition is an array structure representing one or more tables and their related keys and indexes. A schema is defined by hook_schema(), which usually lives in a modulename.install file. |
function db_field_names($fields) {
return Database::getActiveConnection()->schema()->fieldNames($fields);
}