Delete CCK Inactive Fields

Inactive fields occur when active fields controlled by a feature are deleted from the feature and the feature is reverted on a database where the fields deleted are currently active. Here's how to delete them.

$fieldname = "";
 db_query('DELETE FROM {content_node_field} WHERE field_name = "%s"', $fieldname);
 db_query('DELETE FROM {content_node_field_instance} WHERE field_name = "%s"', $fieldname);
comments powered by Disqus

© Balanced Scale Media, LLC. All right reserved.