Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Admin.cgi : sub delete_records ?

Quote Reply
Admin.cgi : sub delete_records ?
Hello!

What I was trying to find it out was the following...


www.gossamer-threads.com/scripts/forum/resources/Forum9/HTML/000034.html


Is this necessary?
Code:
if ($db->{'db_table'} eq 'Category') {
$db->do ("DELETE FROM CategoryAlternates WHERE CategoryID = $id");
$db->do ("DELETE FROM CategoryRelations WHERE CategoryID = $id OR RelatedID = $id");
$db->do ("DELETE FROM CategoryHeiarchy WHERE CategoryID = $id AND Depth = 0");
$db->do ("DELETE FROM CategoryHeiarchy WHERE SubCategoryID = $id AND Depth > 0");
}
Thanks



[This message has been edited by rajani (edited November 02, 1999).]

[This message has been edited by rajani (edited November 02, 1999).]
Quote Reply
Re: Admin.cgi : sub delete_records ? In reply to
Hello Alex!

I tried to insert the URL with a clickable link. Since the text area field is very small it automatically inserted a <br> Smile tag in between.

I had mentioned earlier that the text field is a bit small to insert codes of the scripts and also to follow them vizually what is pasted.

[This message has been edited by rajani (edited November 02, 1999).]
Quote Reply
Re: Admin.cgi : sub delete_records ? In reply to
Yes, that is neccessary to maintain that you don't have orphaned links in the supporting tables.

Cheers,

Alex