Answer the question
In order to leave comments, you need to log in
How to correctly update information in a table with nested sets?
Problem - figures in some records in right and left fields got off. There is information about the hierarchy (parent_id field) and it is correct. How to recalculate right and left for the whole tree?
Answer the question
In order to leave comments, you need to log in
First, solve the problem with the downed code. Some rubbish destroyed your structure.
And secondly, restart the build.
PS How do you imagine editing errors? Let's say you lost a parent. How will you contribute?
In theory, take the entire range and lay it out to the right to the left, but without seeing the code and not knowing what the mistake is, this is mother's occupation.
1. Write a structure integrity check in the code.
2. Watch for validation errors and correct them consistently.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question