MySQL Tree ordered by parent and child

前端 未结 3 1128
[愿得一人]
[愿得一人] 2020-12-10 22:18

I\'m trying to display a tree structure in MYSQL with this reference (http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/) and I\'m seeing that only works w

3条回答
  •  甜味超标
    2020-12-10 22:42

    You need somehow a self join to show the relationship. After ...relations As child_menu you need to add left join relations as r2 on r2.parent_id = child_menu.id...

提交回复
热议问题