php - adjacency list with multiple parent for some leaf? -


i want create blog , in blog can have n-level category , realy need store single post in several category. want adjancy list model multiple parent leaf nodes. think should create 3 table creating many many join, , table are

categories-tbl

id    cat-name    parent-id 

leaf-posts-tbl

id    post-name  

post-cat-tbl

post-id    cat-id 

now

i want query simple adjacency list tables?

1.how can leaf of parent?

2.get subtree childs

3.delete,update,insert...


Comments