Archive for March 18th, 2009
Hierarchical queries in MySQL: adding level
This is a series of articles on hierarchical queries in MySQL:
- Hierarchical queries in MySQL
- Hierarchical queries in MySQL: adding level
- Hierarchical queries in MySQL: adding ancestry chains.
- Hierarchical queries in MySQL: finding leaves
- Hierarchical queries in MySQL: finding loops
See also:
Today I will add some more features to these queries.
We have almost 100,000 rows in the table, 8 hierarchy levels, and our query is written so that it always selects all rows.
Now let's try to present our data in a Yahoo-style catalog. We need only top 2 levels: parent categories and their subcategories.
Read the rest of this entry »