$object->delete
$object->delete -- Delete a record
Description
boolean **$object->delete** (void)
Minimum version: Midgard 1.4 (Bifrost)
Is used to delete the record represented by the object. The object must first be instantiated by a call to either mgd_get_XXX() or mgd_list_XXX().
An object cannot be deleted if it has dependants: parameters, attachments or reply articles, for example. Delete those first or use the mgd_delete_XXX_tree() functions, where appropriate.
Returns TRUE on success, FALSE on failure.
delete()) {
echo "Deleted article.
\n";
} else {
echo "Failed to delete article.
\n";
echo "Reason: " . mgd_errstr();
}
?>
Method available for the following objects: * article, * attachment, * element, * event, * event_member, * group, * host, * member, * page, * pageelement, * pagelink, * person, * preference, * sitegroup, * snippet, * snippetdir, * [MidgardStyle|style][MidgardTopic|topic]
