Getting hierarchy data from self-referencing tables

前端 未结 5 1576
孤独总比滥情好
孤独总比滥情好 2020-12-13 15:00

Let\'s say you have the following table:

items(item_id, item_parent)  

... and it is a self-referencing table - item_parent r

5条回答
  •  难免孤独
    2020-12-13 15:37

    I need to find a solution for the same task, found some articles, but still didn't choose which way to go...

    http://explainextended.com/2009/07/20/hierarchical-data-in-mysql-parents-and-children-in-one-query/

    May be these links might help you. If you find a good solution - please post it here. i'm not allowed to post more then 1 link - i will add some to next posts

提交回复
热议问题