Actually I don't have the idea that whether I should use some technique in storing data so that I can fetch according to my requirement or just need to search a query returning data according to my requirement. I want to store some data that is linked with eachother some rough data is given below
Name Reference City
Mian Null GUj
Hamza Mian Khi
Adam Mian Lhr
Jamil Adam Lhr
Musa Jamil Khi
Subhan Musa ISL
I want the solution that when I enter some name its fetches data of that person and its all childs and sub childs.
Ex: If I enter Adam acoording to above table info it should return Adam, Jamil, Musa, Subhan.