function tripal_core_delete_property_by_id

2.x tripal_core.DEPRECATED.api.inc tripal_core_delete_property_by_id($basetable, $property_id)
3.x tripal_core.DEPRECATED.inc tripal_core_delete_property_by_id($basetable, $property_id)
1.x tripal_core_chado.api.inc tripal_core_delete_property_by_id($basetable, $record_id)

Deprecated

Restructured API to make naming more readable and consistent. Function was deprecated in Tripal 2.0 and will be removed 2 releases from now. This function is considered to be no easier to use than chado_delete_record directly chado_delete_record().

See also

chado_delete_record().

File

legacy/tripal_core/api/tripal_core.DEPRECATED.inc, line 912
Contains all the deprecated functions to keep the tripal api backwards compatible.

Code

function tripal_core_delete_property_by_id($basetable, $property_id) {

  tripal_report_error(
  'tripal_deprecated', 
  TRIPAL_NOTICE, 
  "DEPRECATED: %old_function has been replaced with %new_function. This requires manual
      intervention since the arguments for the two functions are different.
      Please update your code.", 
  array(
    '%old_function' => 'tripal_core_delete_property_by_id',
    '%new_function' => 'chado_delete_record'
  )
  );

  // construct the array that will match the exact record to update
  $match = array(
    $basetable . 'prop_id' => $property_id,
  );

  return chado_delete_record($basetable . 'prop', $match);

}