This image demonstrates what I'm trying to achieve. On the left is the table data, on the right the table I'm trying to create.
the table uses the parentID to reference another item within the same table to create a hierarchy.
How would I go about creating queries and organizing them in this way?
What if I select "Pirates" and want to get all the parents? Is there anything in CFML that makes this easier than looping queries until I get to the top?