Ztree because now want to do a tree, to find out department name, under the department of staff name, staff subordinate departments pid, could you tell me how to write the query to?
CodePudding user response:
The select a. d. _name d_id, b.m an_name from t_dept a
Left the join t_man_dept c on a. d. _id=c.d _id
Left the join t_manager b on c. d_manid=b.m an_id