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, |
1.x tripal_core_chado.api.inc | tripal_core_delete_property_by_id($basetable, $record_id) |
Deletes a property using the property ID
Parameters
$basetable: The base table for which the property should be deleted. Thus to deleted a property for a feature the basetable=feature and property is deleted from featureprop
$record_id: The primary key of the basetable to delete a property for. This should be in integer.
Return value
Return True on Delete and False otherwise
Related topics
2 calls to tripal_core_delete_property_by_id()
- tripal_feature_analysis_delete_property_by_id in tripal_feature/
api/ tripal_feature.api.inc - Delete a property using the analysisfeatureprop_id
- tripal_feature_delete_property_by_id in tripal_feature/
api/ tripal_feature.api.inc - Delete a given feature property using the featureprop_id
File
- tripal_core/
api/ tripal_core_chado.api.inc, line 2864 - The Tripal Core API
Code
function tripal_core_delete_property_by_id($basetable, $record_id) {
// get the foreign key for this property table
$table_desc = tripal_core_get_chado_table_schema($basetable . 'prop');
$pkcol = $table_desc['primary key'][0];
// construct the array that will match the exact record to update
$match = array(
$pkcol => $record_id,
);
return tripal_core_chado_delete($basetable . 'prop', $match);
}