E
E
EVOSandru62014-12-25 13:38:01
Yii
EVOSandru6, 2014-12-25 13:38:01

What is the behavior of NestedSetBehavior - lft and rgt in Yii, and how to do without parent_id in this question?

Previously, I worked in php and used the following table structure in hierarchical things:
----------------
Goods for example
---------------
CODE
CODE_PAR
LEVEL
SHIFR
NAME
-------------
In Yii , I haven't been able to figure out what lft and rgt are for quite some time now. At first I thought that the Left is an analogue of CODE_PAR , but this picture completely confused me www.getinfo.ru/article610.html. Please explain to the ignorant what lft and rgt are and how to live without a parent code ?!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Grechushnikov, 2014-12-25
@maxyc_webber

this article explains quite well what lft is and what rgt is, I
advise you not to go into the database to work with this hierarchy, even if you understand well the meaning of NestedSets, it’s rather difficult for them to appear. this plugin does 99% of the job perfectly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question