function uc_attribute_option_delete in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_attribute/uc_attribute.module \uc_attribute_option_delete()
- 7.3 uc_attribute/uc_attribute.module \uc_attribute_option_delete()
Deletes an attribute option from the database.
Parameters
$oid: Option ID to delete.
Return value
The Drupal SAVED_DELETED flag.
File
- uc_attribute/
uc_attribute.module, line 875
Code
function uc_attribute_option_delete($oid) {
// Delete the class attribute options.
uc_attribute_subject_option_delete($oid, 'class');
// Delete the product attribute options. (and the adjustments!)
uc_attribute_subject_option_delete($oid, 'product');
// Delete base attributes and their options.
db_query("DELETE FROM {uc_attribute_options} WHERE oid = %d", $oid);
return SAVED_DELETED;
}