I have one table say A, with location { delhi, patna, kanpur} and it's location id is {1,2,3} . I also have another table say locationjourney in which a person xyz travels from location id 1 to 3 and another person abc from 2 to 3. Now I need to display: person name(xyz)and location from ( delhi) to( kanpur)
Discussion posts and replies are publicly visible
I am assuming your second table contains 3 columns : personName, locationFromID and locationToID. There can be different ways to retrieve data and display it but easiest nd best would to create a view in DB and read it directly. Something like
Table2 left join table1 on table2.locationFromID = Table1.ID
Left table1 on table2.locationToID = table1.id