Posted by Anon on 10/13/26 11:25
Im wondering if someone could help me with a recursive style sql command
section = SectionID, parent
I want to be able to delete a row where SectionID=X but also delete any
section that matches SectionID.
Kinda like the hierarchy of folders on your harddrive.
I want to delete any subfolders of the main folder I am deleting.
Can anyone give me some direction, my SQL isn't up to all that much.
Ive got the following but its more pseudo code rather than something I
expect to work.
DELETE *
FROM jss_sections
WHERE Parent=SectionID AND (DELETE * FROM jss_sections WHERE
SectionID.new=Parent)
TIA
Simon
[Back to original message]
|