Answer the question
In order to leave comments, you need to log in
How to write a query on a table with an internal relationship?
It seems to me that the question is elementary, but what I dug up on the Internet is not about that at all. The bottom line is this:
There is a table:
id;name;parent
1;alex;0
2;mary;1
3;alice;1
4;hoover;2
id;name;parent
4;hoover;2
2;mary;1
1;alex;0
Answer the question
In order to leave comments, you need to log in
on('submit', must not required fields are not filled
as an option to bypass all elements with required loop and check .var()
If nesting is limited, then joins can be used (according to the number of nesting levels). But even in this case, as in your question, it will not work - everything will be one line.
If nesting is unlimited, then no way.
id;name;parent
1;alex;0
2;mary;1
3;alice;1
4;hoover;2
id;name
1;alex
2;mary
3;alice
4;hoover
parent_id;element_id
1;2
1;3
1;4
2;4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question