There are two ways that I know of the adjacency model
and nested sets.
adjacency model uses a table structure like
category_id | parent_id | category_name
so if i want to see all categories belonging to
category 12
-> SELECT * FROM cat_table WHERE parent_id=12;
there are a few articles out ther
Hello guys
I make following query:
mysql> SELECT b.type, a.link AS parent_link, b.link AS child_link FROM
bookmarks AS a, bookmarks AS b WHERE a.id = b.parentid order by
parent_link;
and here is result
++-++
| type | parent_link | child_link