nested-sets
Get the count of the number of items under the children categories of a given category in MySQL
Say we have this tables t1 -------------------------------- category_id | name | lft | rgt --------------------------------[详细]
2023-01-30 10:54 分类:问答Nested Set SQL problem
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html LOCK TABLE nested_category WRITE; SELECT @myLeft := lft FROM nested_category[详细]
2023-01-30 05:55 分类:问答How to change this CROSS JOIN SQL created for a tree traversal (nested set)?
In the query below there is a field called main which is used to differentiate the categorie开发者_如何学Cs.[详细]
2023-01-28 22:23 分类:问答awesome_nested_set duplicating children in a select
I am having a problem with awesome_nested_set duplicating children in a select (as the title says) I have the following data in the table (phpmyadmin put quotes around the fields):[详细]
2023-01-28 09:41 分类:问答nested set, how to set left and right value with php&mysql
when i search on the internet about nest开发者_如何学Pythoned set, everyone assume i have already left and right values. but i dont have (; i have id, name, parent_id as column. how can i find left an[详细]
2023-01-27 16:09 分类:问答How we insert 'lft' and 'rgt' values for nested-set model for a data that we are receiving from other source?
I have to manage some hierarchical data for my web application. The data consist of messages of four types. I decided to use nested-list model because there can be arbitrary number of child nodes in t[详细]
2023-01-26 11:52 分类:问答What should I use for a collection of different objects in matlab?
This is illegal in Matlab a = [[1];[2 3]] In languages that allow this, this is called nested arrays. I found a way of doing the same in Matlab:[详细]
2023-01-24 20:32 分类:问答Complex aggregate functions and hierarchical structures in SQL
I want to store a tree structure of arbitrary depth in an SQL database (MySQL, but want to avoid DBMS-specific features). Now I want to compute a value N for each node as follows:[详细]
2023-01-15 16:01 分类:问答How to repair a corrupted MPTT tree (nested set) in the database using SQL?
I have an MPTT tree of over 100,000 records stored in MySQL using lft, rght and parent_id columns. Now the left/right values became corrupted, while the parent ids are still intact. 开发者_Python百科I[详细]
2023-01-14 07:03 分类:问答optimizing a view for hierarchical data
I currently have a query that contains a self-join to query all the direct and indirect managers of an employee from a table that stores company organization info using the nested sets model.In this S[详细]
2023-01-09 21:22 分类:问答