Archive for March 19th, 2009
Hierarchical queries in MySQL: adding ancestry chains.
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, we will improve the query a little more.
If we develop the catalog with categories, subcategories etc, it's useful to have breadcrumb links somewhere in the header of the page.
In Oracle, there is a special function called SYS_CONNECT_BY_PATH(row_expression, delimiter)
, that returns the ancestry chain of a given node.
Read the rest of this entry »