You are here

function node_field_db_field_delete in Node Field 7.2

Delete fields from database.

Parameters

array $values: Node fields matching these values will be deleted from database.

Return value

int Count of deleted records.

2 calls to node_field_db_field_delete()
node_field_delete_node_field in includes/node_field.api.inc
Delete node field. Input array must contain id of field.
node_field_delete_node_fields in includes/node_field.api.inc
Delete all node fields of node.

File

model/node_field.db.inc, line 45
Database related functions for node_field module.

Code

function node_field_db_field_delete(array $values) {
  $query = db_delete('node_field');
  foreach ($values as $key => $value) {
    $query
      ->condition('node_field.' . $key, $value);
  }
  $output = $query
    ->execute();
  return $output;
}