nanoman
2007-04-26 08:23:04 UTC
Hello,
I've got a Nested Set structure in MySQL 4 here with
- id
- lft
- rgt
- parent_id
- root_id
I wrote some test scripts and i discovered that the Nested Set (the
structure with lft and rgt nodes) is broken, there are some duplicate
nodes and other really bad stuff.
Luckily, the dude who developed the system has a parent_id-Structure
in the database too, and I'm pretty sure that the parent_id-
relationships are correct.
So, now my question: I'd need a Query or a PHP Script to generate a
correct node structure out of the parent_id-relationships. Any tips or
links?
Thanks guys!
Regards
I've got a Nested Set structure in MySQL 4 here with
- id
- lft
- rgt
- parent_id
- root_id
I wrote some test scripts and i discovered that the Nested Set (the
structure with lft and rgt nodes) is broken, there are some duplicate
nodes and other really bad stuff.
Luckily, the dude who developed the system has a parent_id-Structure
in the database too, and I'm pretty sure that the parent_id-
relationships are correct.
So, now my question: I'd need a Query or a PHP Script to generate a
correct node structure out of the parent_id-relationships. Any tips or
links?
Thanks guys!
Regards