Reputation: 35684
I have two tables of data categories and category relations. This is a setup to allow infinite levels of parent/child relationships.
I could put it into a linked list too I guess, but this might allow one child to have multiple parents if the need ever comes up.
I have a query that combines these two as well as some other tables, and using those I have a list of all categories. I want to sort them by the level they're at, without counting and updating the database with the depth level.
and now the question....
Is there a way to do a where operation on a query, or filter it based on a value such as parentID=2
?
Upvotes: 1
Views: 1023