You are here

function farm_asset_property_delete in farmOS 7

Delete an asset property.

Parameters

$asset_id: The ID of the asset.

$name: The name of the property.

File

modules/farm/farm_asset/farm_asset_property/farm_asset_property.module, line 112
Farm asset property.

Code

function farm_asset_property_delete($asset_id, $name) {

  // Make sure the ID and name are not empty.
  if (empty($asset_id) || empty($name)) {
    return;
  }

  // Run a DELETE query.
  db_query('DELETE FROM {farm_asset_property} WHERE id=:id AND name=:name', array(
    ':id' => $asset_id,
    ':name' => $name,
  ));
}