You are here

function farm_plan_consideration_delete in farmOS 7

Delete a consideration from the database.

Parameters

int $id: The consideration ID.

1 call to farm_plan_consideration_delete()
farm_plan_consideration_delete_form_submit in modules/farm/farm_plan/farm_plan_consideration/farm_plan_consideration.module
Delete form submit handler.

File

modules/farm/farm_plan/farm_plan_consideration/farm_plan_consideration.module, line 202
Farm plan consideration module.

Code

function farm_plan_consideration_delete($id) {

  // If the ID is empty, bail.
  if (empty($id)) {
    return;
  }

  // Delete the consideration.
  db_query('DELETE FROM {farm_plan_consideration} WHERE id = :id', array(
    ':id' => $id,
  ));

  // Delete any entity associations to that consideration.
  db_query('DELETE FROM {farm_plan_consideration_entity} WHERE consideration_id = :id', array(
    ':id' => $id,
  ));
}