function hosting_site_delete in Hosting 5
Same name and namespace in other branches
- 6.2 site/hosting_site.nodeapi.inc \hosting_site_delete()
- 7.4 site/hosting_site.nodeapi.inc \hosting_site_delete()
- 7.3 site/hosting_site.nodeapi.inc \hosting_site_delete()
Implementation of hook_delete().
File
- site/
hosting_site.module, line 427
Code
function hosting_site_delete($node) {
db_query('DELETE FROM {hosting_site} WHERE nid = %d', $node->nid);
db_query('DELETE FROM {hosting_package_instance} WHERE rid=%d', $node->nid);
$result = db_query("SELECT distinct nid FROM {hosting_task} WHERE rid=%d", $node->nid);
while ($nid = db_fetch_object($result)) {
node_delete($nid->nid);
}
}