adjacency-list-model

multi level menu from database in codeigniter

扶醉桌前 提交于 2019-12-22 12:27:47
问题 I have a table in my database containing all of my database categories, which I need to convert into a multi-level menu. The table structure is below: product_category_id | product_category_name | product_category_description | product_category_parent_id -------------------------------------------------------------------------------------------------------- 1 test ulghjbjjjh NULL 2 test2 yruktghkug NULL 3 test sub 1 yr5y346uij 1 4 test sub sub 1 yfghvbnhtd 3 Using the functions I have adapted

multi level menu from database in codeigniter

故事扮演 提交于 2019-12-06 07:28:58
I have a table in my database containing all of my database categories, which I need to convert into a multi-level menu. The table structure is below: product_category_id | product_category_name | product_category_description | product_category_parent_id -------------------------------------------------------------------------------------------------------- 1 test ulghjbjjjh NULL 2 test2 yruktghkug NULL 3 test sub 1 yr5y346uij 1 4 test sub sub 1 yfghvbnhtd 3 Using the functions I have adapted from an online tutorial ( here ) and hours of research the resulting code will only display the top

Adjacency List Model vs Nested Set Model for MySQL hierarchical data?

放肆的年华 提交于 2019-11-28 20:38:07
There are two ways to work with hierarchy data in MySQL : Adjacency List Model Nested Set Model A major problem of the Adjacency List Model is that we need to run one query for each node to get the path of the hierarchy. In the Nested Set Model this problem does not exist, but for each added node is necessary to give a MySQL UPDATE on all others left and right value. My hierarchical data is not static data, such as product categories of e-commerce. Are constant registration of users in hierarchical sequence. In my application, while there are many constants users registration, I also need to

Adjacency List Model vs Nested Set Model for MySQL hierarchical data?

放肆的年华 提交于 2019-11-27 11:40:58
问题 There are two ways to work with hierarchy data in MySQL: Adjacency List Model Nested Set Model A major problem of the Adjacency List Model is that we need to run one query for each node to get the path of the hierarchy. In the Nested Set Model this problem does not exist, but for each added node is necessary to give a MySQL UPDATE on all others left and right value. My hierarchical data is not static data, such as product categories of e-commerce. Are constant registration of users in