Вопрос

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 ?

Это было полезно?

Решение

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top