in reply to Re: Tree module select
in thread Tree module select

Thanks for the help
My tree-like data may look like this:

3160
  |---8500010
  |---8500020
  |      |----8500021
  |      |       |----8500121
  |      |       \----8500122
  |      |----8500022
  |      \----8500023
  |              |----8500024
  |              \----8500025
  |---8500021
  |       |---8500121
  |       \---8500122
  \---8500030
3171
|----2800010 |----2800020 | \----8500025 |----8500010 |----8500020 | |----8500021 | | |----8500121 | | \----8500122 | |----8500022 | \----8500023 | |----8500024 | \----8500025 \---8500023 |----8500024 \----8500025

8500025 belong to 3160 and 3171
8500020 belong to 3160 and 3171

It can be printed as this:

3160
  |---8500010
  |---8500020
  |---8500021
  \---8500030
3171
|----2800010 |----2800020 | \----8500025 |----8500010 |----8500020 \---8500023

The table may like this:
-------------------------
 parentid    |   iiem id
-------------------------
             |    3160
  3160       |  8500010
  3160       |  8500020
  8500020    |  8500021
  8500021    |  8500121
  8500021    |  8500122
  8500020    |  8500022
  8500020    |  8500023
  8500023    |  8500024
  8500023    |  8500025
  3160       |  8500021
  3160       |  8500030
             |    3171
  3171       |  2800010
  3171       |  2800020
  2800020    |  8500025
  3171       |  8500010
  3171       |  8500020
  3171       |  8500023
---------------------------

I don't know which data stucture i should use.