Doubt with hierarchical data

1

Talk to people, okay?

I have a problem, I already have a few days, in the system I need to control the display of some data, I have a function register, sector and employee, connected between yes. In this business rule, the User can assemble his sector and then his hierarchy dynamically, so that Users can only see their data and if they are responsible for someone, this user can see the data of his subordinate and the data of your subordinate's subordinate and so on.

In this table I can know who is responsible for who is able to have a hierarchical line.

My problem is to be able to do this scale, to know who is responsible of who and if this person who is subordinate is responsible for someone tb, so the first person can see the data of the second responsible and see the data are subordinate of that responsible . Does anyone know of a way to do this? And if this is the best way to store those responsible (Hierarchy)

NOTE: In column responsavel_titular and responsavel_subordinado are employee codes.

    
asked by anonymous 17.10.2016 / 18:30

0 answers