function tripal_delete_phylotree

2.x tripal_phylogeny.api.inc tripal_delete_phylotree($phylotree_id)
3.x tripal_chado.module.DEPRECATED.api.inc tripal_delete_phylotree($phylotree_id)

Deletes a phylotree record from Chado.

Parameters

$phylotree_id:

Return value

TRUE on success, FALSE on failure.

1 call to tripal_delete_phylotree()
drush_tripal_phylogeny_trp_delete_phylotree in tripal_phylogeny/tripal_phylogeny.drush.inc
Deletes a phylotree record.

File

tripal_phylogeny/api/tripal_phylogeny.api.inc, line 515

Code

function tripal_delete_phylotree($phylotree_id) {

  // if we don't have a phylotree id for this node then this isn't a node of
  // type chado_phylotree or the entry in the chado_phylotree table was lost.
  if (!$phylotree_id) {
    tripal_report_error('tripal_phylogeny', TRIPAL_ERROR, 
    'Please provide a phylotree_id to delete a tree.');
    return FALSE;
  }

  // Remove the tree
  $values = array('phylotree_id' => $phylotree_id);
  return chado_delete_record('phylotree', $values);
}