I have table Location like this:
ID, PID, Location
1 NuLL Country
2 1 City
3 2 County
4 3 District
5 4 Social
... ... ....
How can I handle my database in MySQL that returns this:
ID, Location, Full Location
1 Country Country
2 City City-Country
3 County County-City-Country
4 District District-County-City-Country
5 Social Social-District-County-City-Country
... ... ...
pid = null)? If you have multiple parents, are your expected results to show all parents and children, or just a specific parent/child?