We have a table with around 40000 id's in - some of these IDs are parents of other IDs (and subsequently some of those are parents of others in a different table). I'd like to use magic, persistance and some joins to work out which categories are related by querying against a field that contains all the child IDs (known as arrange).We have a table with around 40000 id's in - som